activemq-artemis - 了解连接器 ActiveMQ Artemis

标签 activemq-artemis

我是 ActiveMQ Artemis 的新手

我已阅读文档,发现客户端使用连接器来定义它如何连接到服务器。

我有一个 Broker.xml 文件,其中包含以下代码

     <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>

所以接受者在这里说,嘿,你可以在端口 61617 上与我连接,我正在监听它(这对我来说是有意义的) 但是连接器在这个broker.xml中的作用又如何呢? 连接器的目标端口与接受器中的端口(tcp://0.0.0.0:61616)相同, 我想了解Connector中提到的端口是什么意思,请解释一下。

最佳答案

您是否碰巧读过 the documentation关于这个话题?有一个标题为“了解连接器”的部分应该可以回答您的大多数(如果不是全部)问题。我将引用最重要的部分:

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.

关于activemq-artemis - 了解连接器 ActiveMQ Artemis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47516209/

相关文章:

spring-boot - (ActiveMQ-客户端-netty-线程)] org.apache.catalina.loader.Weba................. : this web application instance has been stopped already

activemq-artemis - 按内容属性过滤消息

java - Apache ActiveMQ Artemis 客户端可以连接到现有的 ActiveMQ "Classic"5.15.x 代理吗?

jms - 设置ActiveMQ Artemis路由类型,Spring Boot JmsListener作为客户端

java - 是否有兼容 Java 1.7 的 Artemis JMS 客户端?

activemq-artemis - 连接 Artemis 和 Amazon MQ 代理

activemq-artemis - 监听 0.0.0.0 时无法访问 Artemis GUI

java - 无法将 org.apache.qpid.jms.provider.amqp.AmqpProviderFactory 转换为 org.apache.qpid.jms.provider.ProviderFactory

jms - 如何将 WildFly 连接到远程 Artemis 服务器

启用持久性的 Java 堆内存已满