Understanding Connectors ActiveMQ Artemis

拥有回忆 提交于 2019-12-24 12:14:30

问题


I am new in ActiveMQ Artemis

I have read doc and found connectors are used by a client to define how it connects to a server.

I have a broker.xml file which have following peace of code

     <connectors>
             <connector name="netty-connector">tcp://0.0.0.0:61616</connector>
             <!-- connector to the server1 -->
             <connector name="server1-connector">tcp://0.0.0.0:9616</connector>
          </connectors>
   <!-- Acceptors -->
      <acceptors>
         <acceptor name="netty-acceptor">tcp://0.0.0.0:61616</acceptor>
      </acceptors>

so here acceptor is saying,Hey you can connect with me on port 61617, I am listening on it(which is making sense for me) but what about role of connector in this broker.xml. Connector is targeting same port(tcp://0.0.0.0:61616) as in acceptor, I want to understand it what is it port means which is mentioned in Connector, can some please explain it.


回答1:


Did you happen to read the documentation on this subject? There is a section titled "Understanding Connectors" which should answer most, if not all, of your questions. I'll quote the most salient parts:

Whereas acceptors are used on the server to define how we accept connections, connectors are used to define how to connect to a server.

A connector is used when the server acts as a client itself, e.g.:

  • When one server is bridged to another
  • When a server takes part in a cluster

In these cases the server needs to know how to connect to other servers. That's defined by connectors.



来源:https://stackoverflow.com/questions/47516209/understanding-connectors-activemq-artemis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!