You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Steigerwald, Aaron" <as...@brandesassociates.com.INVALID> on 2022/04/06 03:47:53 UTC

RE: [EXTERNAL]:Re: Artemis Cluster Topology Status and Notifications

Thank you Domenico, this is very helpful. I will use it in conjunction with the ClusterTopologyListener interface, which I found by looking through the code. I made a plugin that adds the ClusterTopologyListener instance in the following way:

	@Override
	public void registered(ActiveMQServer server) {
		server.getClusterManager().getClusterController().addClusterTopologyListener(new MyClusterTopologyListener(server.getActiveMQServerControl()));

It seems to work as expected.

Thanks again,
Aaron

-----Original Message-----
From: Domenico Francesco Bruscino <br...@gmail.com> 
Sent: Monday, April 4, 2022 11:03 AM
To: users@activemq.apache.org
Subject: [EXTERNAL]:Re: Artemis Cluster Topology Status and Notifications

[CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.] ________________________________


Hi Aaron,

there are no direct notification messages generated for cluster’s topology changes. The management API to get list of nodes in the cluster’s topology is org.apache.activemq.artemis.api.core.management.ActiveMQServerControl.listNetworkTopology()
[1], see the management documentation [2].

[1]
https://github.com/apache/activemq-artemis/blob/2.21.0/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java#L1846

[2]
https://activemq.apache.org/components/artemis/documentation/latest/management.html

Regards,
Domenico

On Mon, 4 Apr 2022 at 04:35, Steigerwald, Aaron <as...@brandesassociates.com.invalid> wrote:

> Hello,
>
> Do any of the ActiveMQServerPlugin methods get called for all live 
> nodes when a cluster’s topology changes, such as when one master node 
> crashes and its slave becomes live? Are any management notification 
> messages generated for the same situation? I looked in the code and it 
> looks like the CLUSTER_CONNECTION_STOPPED notification is generated on 
> the broker that is removed from a cluster gracefully, but it doesn’t 
> look like the same message is generated for other nodes in the cluster.
>
> Also, what broker Java method provides the current active (live and
> standby) nodes in the cluster’s topology?
>
> Thank you,
> Aaron Steigerwald
>

Re: [EXTERNAL]:Re: Artemis Cluster Topology Status and Notifications

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
Hi Aaron,

nice solution, thank you for sharing it.

Regards,
Domenico

On Wed, 6 Apr 2022 at 05:48, Steigerwald, Aaron
<as...@brandesassociates.com.invalid> wrote:

> Thank you Domenico, this is very helpful. I will use it in conjunction
> with the ClusterTopologyListener interface, which I found by looking
> through the code. I made a plugin that adds the ClusterTopologyListener
> instance in the following way:
>
>         @Override
>         public void registered(ActiveMQServer server) {
>
> server.getClusterManager().getClusterController().addClusterTopologyListener(new
> MyClusterTopologyListener(server.getActiveMQServerControl()));
>
> It seems to work as expected.
>
> Thanks again,
> Aaron
>
> -----Original Message-----
> From: Domenico Francesco Bruscino <br...@gmail.com>
> Sent: Monday, April 4, 2022 11:03 AM
> To: users@activemq.apache.org
> Subject: [EXTERNAL]:Re: Artemis Cluster Topology Status and Notifications
>
> [CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.] ________________________________
>
>
> Hi Aaron,
>
> there are no direct notification messages generated for cluster’s topology
> changes. The management API to get list of nodes in the cluster’s topology
> is
> org.apache.activemq.artemis.api.core.management.ActiveMQServerControl.listNetworkTopology()
> [1], see the management documentation [2].
>
> [1]
>
> https://github.com/apache/activemq-artemis/blob/2.21.0/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java#L1846
>
> [2]
>
> https://activemq.apache.org/components/artemis/documentation/latest/management.html
>
> Regards,
> Domenico
>
> On Mon, 4 Apr 2022 at 04:35, Steigerwald, Aaron
> <as...@brandesassociates.com.invalid> wrote:
>
> > Hello,
> >
> > Do any of the ActiveMQServerPlugin methods get called for all live
> > nodes when a cluster’s topology changes, such as when one master node
> > crashes and its slave becomes live? Are any management notification
> > messages generated for the same situation? I looked in the code and it
> > looks like the CLUSTER_CONNECTION_STOPPED notification is generated on
> > the broker that is removed from a cluster gracefully, but it doesn’t
> > look like the same message is generated for other nodes in the cluster.
> >
> > Also, what broker Java method provides the current active (live and
> > standby) nodes in the cluster’s topology?
> >
> > Thank you,
> > Aaron Steigerwald
> >
>