user3133542
user3133542

Reputation: 1715

Vertx Hazelcast: Cluster Problems

im working with Vertx and HazelCast to distribute my Verticles about the network.

No I have the problem, that my co-worker also uses clustered verticles with HazelCastManager. Is there a possibility to avoid, that our verticles see each other to prevent by-effects?

Upvotes: 1

Views: 1047

Answers (3)

Bambam
Bambam

Reputation: 3899

Old question, but still valid, here's simple answer:

If you want to limit your vertx system to the single server, i.e. not have the eventbus leak out across your local network, the simplest thing to do is create a local copy of Hazelcast's cluster.xml on your classpath, i.e. copy/edit vertx source (see git):

vertx-hazelcast/src/main/resources/default-cluster.xml

into a new file in your vertx project

src/main/resources/cluster.xml

The required change is to the <multicast> stanza disabling that feature:

<hazelcast ...>
   ...
  <network>
      ...
    <join>
          ...
      <multicast enabled="false">
             ...
      </multicast>
      <tcp-ip enabled="true">
          <interface>127.0.0.1</interface>
      </tcp-ip>

Upvotes: 0

tom.bujok
tom.bujok

Reputation: 1642

You can define Hazelcast Cluster Groups in your cluster.xml file. Here's the manual section related to it: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#creating-cluster-groups

Upvotes: 4

noctarius
noctarius

Reputation: 6094

If you use Multicast (default config) for discovery, you can redefine the groupname and password. Apart from that you can just choose any other option for discovery supported by the given Hazelcast version inside vert.x: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#discovering-cluster-members

Upvotes: 3

Related Questions