> Config config = new
> XmlConfigBuilder("/path/to/config/file.xml").build();
>
> config.setGroupName( "groupName" );
>
> HazelcastInstance instance = Hazelcast.newHazelcastInstance( config );
Atle is right. Just to make it clear:
Config config1= new XmlConfigBuilder().build();
config1.setGroupName("app1");
HazelcastInstance instanceApp1 = Hazelcast.newHazelcastInstance( config1);
Config config2= new XmlConfigBuilder().build();
config2.setGroupName("app2");
HazelcastInstance instanceApp2 = Hazelcast.newHazelcastInstance( config2);
Now instanceApp1 and instanceApp2 are not going to be members of the
same cluster because they have different group names.
I like to emphasis the fact that cluster isolation cannot achieved by
changing ports. You don't even have to change the ports at all,
changing the groupName should be enough.
Hope it is clear.
Regards,
-talip
I love hearing this.
> I understand that changing the group name will provide isolation.
> However, I am still a bit puzzled how that could work when different
> applications (i.e. different groups) use different hazelcast versions.
> Isn't it possible that a new version of hazelcast could implement a
> different method to setup a group creating incompatibilities and in
> the end resulting in problems.
>
> Or would the behavior be like this:
> * a new version of hazelcast is released (version X) that breaks
> network compatibility with a previous version Y of hazelcast
> * an application A uses version X and an application B uses version Y
> * application A tries to form a group with other members of group A
> but in doing so also communicates to hazelcast instances of
> application B. These members of application B refuse to join the group
> because of an error in setting up the communication (incompatibility)
I see your concern. Yes you are right, all these can happen. We can
eliminate communication protocol conflict. It is not hard to handle, I
already have the solution in mind. Your protocol version idea is also
good and will work. Next snapshot will have it. If protocols are
different then a warning will be logged and nothing else will get
affected, every application will keep working as they were. You still
have to make sure that all application A deployments do have the same
version of Hazelcast though. If not, we can log a warning.
-talip
Can you inform me when the issue is solved? Is there a bug number and
website I can look at to monitor this?