I want to do that from my test clients. As I wrote in my previous mail, I tried using ClusterConnectionControl for that but I can't make sense of the information returned by getTopology() and getNodes()?
We just had another intermittent failure[1]. The test[2] use a cluster of 2 replicated nodes (both are live nodes). In the logs, I have: 18:28:39,833 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221007: Server is now live 18:28:39,834 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0-wildfly-6 [nodeID=f94b61cc-6146-11e5-937b-a3e9631a50ac] ... 18:28:45,794 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 71) AMQ221007: Server is now live 18:28:45,794 INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 71) AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0-wildfly-6 [nodeID=fe8b1275-6146-11e5-b3c8-596354b7fc76] ... 18:28:46,367 INFO [org.apache.activemq.artemis.core.server] (Thread-4 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76-7203298)) AMQ221027: Bridge ClusterConnectionBridge@7edf20 [name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac, queue=QueueImpl[name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76]]@1a3e7c0 targetConnector=ServerLocatorImpl (identity=(Cluster-connection-bridge::ClusterConnectionBridge@7edf20 [name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac, queue=QueueImpl[name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76]]@1a3e7c0 targetConnector=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&port=8080&host=localhost&http-upgrade-endpoint=http-acceptor], discoveryGroupConfiguration=null]]::ClusterConnectionImpl@17494988[nodeUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76, connector=TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?host=localhost&http-upgrade-endpoint=http-acceptor&httpUpgradeEnabled=true&port=8180, address=jms, server=ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76])) [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&port=8080&host=localhost&http-upgrade-endpoint=http-acceptor], discoveryGroupConfiguration=null]] is connected This AMQ221027 is a bit hard to read but it basically says that I have a connection from server f94b61cc to server fe8b1275... However I don't have a corresponding log to show that the bridge is also connected from server fe8b1275to server f94b61cc When the test passes, I do have a 2nd AMQ221027 in the opposite direction. [1] http://brontes.lab.eng.brq.redhat.com/viewLog.html?buildId=72399&tab=buildResultsDiv&buildTypeId=WildFlyCore_PullRequest_WildFlyCoreFullIntegration [2] https://github.com/wildfly/wildfly/blob/master/testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/messaging/ClusteredMessagingTestCase.java On Wed, Sep 23, 2015 at 4:44 PM, Clebert Suconic <[email protected]> wrote: > On Artemis... We have some tests that we validate through topology and > asserting server's bindings... Can you do the same on your tests.. or you > won't have such APIs available? > > On Wed, Sep 23, 2015 at 10:00 AM, Jeff Mesnil <[email protected]> wrote: > >> Hi, >> >> On Tue, Sep 15, 2015 at 5:35 PM, Jeff Mesnil <[email protected]> wrote: >> > On Tue, Sep 15, 2015 at 3:11 PM, Clebert Suconic >> > <[email protected]> wrote: >> >> The ClusterConnectionControl will get the topology from the >> >> ClusterConnection that will get activated only after the server is >> >> activated (start method called). >> >> >> >> As a result this method is only available at the running server. >> > >> > I get an empty nodes when I call it on the live server after starting >> > both servers. >> > Why is there a discrepancy between the number of nodes in >> > #getTopology() and #getNodes()? >> >> We have some clustering tests for our app server using Artemis. >> We noticed frequent failures in these tests because the cluster of >> Artemis nodes is not formed in timely fashion. >> We use JGroups replication for our cluster communication. Usually, the >> tests fails because the cluster is not formed before we start testing >> things. >> >> What is the correct way to ascertain that a cluster is formed? >> Ideally I want to know how many nodes are in the clusters and how many >> of them are live. >> >> Please note that increasing a timeout after servers are started and >> before tests are exercised is not enough. There are some cases where >> the cluster is never formed at all (when playing with failover and >> tailback). But to test this use case, I first must be able to check >> the cluster topology in a reliable way. >> >> thanks, >> jeff >> >> -- >> Jeff Mesnil >> [email protected] >> http://jmesnil.net/weblog/ >> > > > > -- > Clebert Suconic -- Jeff Mesnil [email protected] http://jmesnil.net/weblog/
