With “artemis check node ..” is still not working (sometimes few messages are “lost”) It looks like the broker doesn’t propagate subscriptions in time. I could execute the call twice to be quite sure all the subscriptions are propagated but obviously it’s not the right solution. I’m still investigating.
Anyway, while doing some tests the result from the script was surprising me. Starting from a cluster of 5 nodes the call (static configuration) docker exec -ti broker-4 artemis check node --peers 5 --url tcp://broker-0:61616 returned a positive result (correct) and docker exec -ti broker-4 artemis check node --peers 6 --url tcp://broker-0:61616 returned negative result (correct) if I kill the node 0 and I start a new node (with the same name broker-0) the result is 5 nodes positive result (correct) 6 nodes positive result (ERROR) 7 nodes negative result (correct) if I kill again the node 0 and I start a new node the result is 5 nodes positive result (correct) 6 nodes positive result (ERROR) 7 nodes positive result (ERROR) It looks like the nodes count is the represents the number of the started nodes and not the currently running nodes in the cluster. The broker id once a node is killed and replaced with another node should be different but anyway the previous instance is dead and no more present in the cluster. What I’m missing? Da: Modanese, Riccardo <riccardo.modan...@eurotech.com.INVALID> Data: giovedì, 4 maggio 2023 12:24 A: users@activemq.apache.org <users@activemq.apache.org> Oggetto: R: Artemis - how to detect when a node is joined to the cluster Thank you so much for your feedbacks! I was looking for a solution that avoid me to deploy custom plugins (this is a “support” cluster). The metrics from Prometheus exporter were a good solution. Anyway the command call and the api call you proposed are good options so I’m going to evaluate pros and cons of each of them to choose the better one for my use case. Thank you again! Da: Domenico Francesco Bruscino <bruscin...@gmail.com> Data: giovedì, 4 maggio 2023 12:06 A: users@activemq.apache.org <users@activemq.apache.org> Oggetto: Re: Artemis - how to detect when a node is joined to the cluster You could execute the artemis check node command to check a node topology, i.e. if you need to check that a node with the address IP 192.168.10.1 has a topology with at least 2 other nodes of the cluster use the following command: artemis check node --peers 3 --url tcp://192.168.0.1:61616 On Thu, 4 May 2023 at 11:50, Dondorp, Erwin <erwin.dond...@cgi.com.invalid> wrote: > We use the API operation "listNetworkTopology()" to get this information. > This is also the function that is used by the Broker Diagram. > e. > > -----Original Message----- > From: Modanese, Riccardo <riccardo.modan...@eurotech.com.INVALID> > Sent: donderdag 4 mei 2023 11:25 > To: users@activemq.apache.org > Subject: Artemis - how to detect when a node is joined to the cluster > > > EXTERNAL SENDER: Do not click any links or open any attachments unless > you trust the sender and know the content is safe. > EXPÉDITEUR EXTERNE: Ne cliquez sur aucun lien et n'ouvrez aucune pièce > jointe à moins qu'ils ne proviennent d'un expéditeur fiable, ou que vous > ayez l'assurance que le contenu provient d'une source sûre. > > Hi, > I'm clustering Artemis (2.28.0) using the static configuration. > From my tests the cluster seems to work fine but I didn't find a way to > understand when a node is part of the cluster. > Looking at the standard metrics I see these 2 metrics: > > * artemis_total_connection_count > * artemis_connection_count > > > but there is no way to understand to which connector are established > > I need it because, before adding the node to the list of nodes addressable > by the load balancer, I would to be sure the node is part of the cluster > otherwise some message could be lost. > > In my test I created a cluster and connected few clients to the different > nodes then I killed one node, restarted the same node and reconnected the > disconnected clients to this node. > Each client has its own exclusive queue and publishes messages to random > queues that belongs to other clients also. > So, if the reconnected clients to the freshly restarted node started > publishing messages soon after the reconnection few messages (the firsts) > addressed to clients connected to other nodes are lost. > So I'm suspecting the broker starts to accept connections and messages > from clients before being part of the cluster and I'd like to avoid it by > adding the properly logics to the load balancer. > > Any suggestion is welcome! > > Thanks in advance. > > Riccardo >