activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lachezar Dobrev <l.dob...@gmail.com>
Subject Cluster/Federated Artemis problems
Date Mon, 25 Jan 2016 11:22:16 GMT
  Hello group members.

  I'm having problems with clustering/federating an application's Artemis
embedded server.
  The application is a .WAR with Springframework 4 and Embedded Artemis
1.1.0 (from Spring).

  Multiple instances of the application are expected to be deployed in
multiple spots. The Artemis component is expected to cluster a JMS Topic
between nodes so that if any node sends a message on the topic all
listeners on all nodes should receive the message.
  With a few problems I was able to make the Embedded Artemis Server handle
topic in a single deployment.

  Every application connects to the Embedded Artemis using InVM connector.

  Trying to cluster instances does not work!

  My configuration contains:
  - A NettyAcceptor  on (host):(random-high-port)
  - A NettyConnector on (host):(random-high-port) named "cluster-connector"
  - A BroadcastGroupConfiguration named "cluster-broadcast"
    = UDPBroadcastEndpointFactory
      * group-host 239.1.2.3
      * group-port 12345
      * local-host (host)
      * local-port (random-high-port)
    = ConnectorInfos
      * "cluster-connector"
  - DiscoveryGroupConfiguration named "cluster-discovery"
    = UDPBroadcastEndpointFactory
      * group-host 239.1.2.3
      * group-port 12345
      * local-host (host)
      * local-port (random-high-port)
  - ClusterConnectionConfiguration named "cluster"
    = address: "cluster-address"
    = connectorName: "cluster-connector"
    = discoveryGroupName: "cluster-discovery"

  The configuration is done in Java (not XML) via
o.a.a.a.core.config.Configuration

  As already noted this does not work, even worse when a second application
instance is brought up the VMs on both instances hang on attempt to
shut-down.

  I noticed a possible problem: the network monitor showed, that the
applications keep open UDP socket that has a Send-Q that continuously grows
until about 200K pending, and then it seizes. Further using a tcpdump I
noticed, that the packages being sent by Artemis look invalid, as they're
really BIG: 4096 bytes broadcast datagrams!

  Looking further I found out a possible BUG in
…cluster.impl.BroadcastGroupImpl in the broadcastConnectors() method. It
seems the method works incorrectly with the ActiveMQBuffer and the
underlying NIO ByteBuffer, and instead of sending a package with the needed
data it sends the whole Buffer of nearly 4K zeros and only a few hundred
bytes of actual payload. A package of 4K is next to impossible to send as a
datagram packet.

  I've tried to perform a hot-fix for this issue and succeeded (the
datagrams fell to about 250 bytes), datagrams are sent and received, but
the cluster still does not form.

  Please advise!
  Is there a way to create a cluster without using discovery? Assuming I
know every instance of the application at initialisation time is it
possible to create a cluster of pre-defined nodes?

  Hope I get help.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message