Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
468 views
in Technique[技术] by (71.8m points)

activemq artemis - How to get information about connectors via JMX or EmbeddedActiveMQ

For acceptors, I can get data like embeddedActiveMQ.getActiveMQServer().getAcceptors() or with AcceptorControl

But for connectors I don't find any way to get data or create/delete connector, not in JMX or EmbeddedActiveMQ.

I added to a broker.xml a connector

<connectors>
  <connector name="connector1">tcp://192.168.58.6:61716</connector>
</connectors>

And I thought that I get info about this connector via

embeddedActiveMQ.getActiveMQServer().getConnectorsService().getConnectors()

But this returns size 0.

Artemis version 2.16.0

question from:https://stackoverflow.com/questions/65906953/how-to-get-information-about-connectors-via-jmx-or-embeddedactivemq

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you're using JMX for management then you can use the getConnectorConfigurations() method on the ActiveMQServerControl.

If you're using EmbeddedActiveMQ then you can use embeddedActiveMQ.getActiveMQServer().getConfiguration().getConnectorConfigurations().values(). That will give you a Collection<TransportConfiguration> of the connectors which you've configured.

The difference between acceptors and connectors in this context is that an acceptor is standalone resource which is deployed and managed independently of anything else. A connector, on the other hand, is essentially just a configuration container which is referenced and used by other components (e.g. a bridge). A connector is not deployed in and of itself.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...