了解连接器 ActiveMQ Artemis
Understanding Connectors 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) 与接受器相同,
我想了解一下连接器中提到的端口是什么意思,有没有大佬解释一下。
您是否碰巧读过 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 的新手
我已阅读文档并发现 客户端使用连接器 来定义它如何连接到服务器。
我有一个 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) 与接受器相同, 我想了解一下连接器中提到的端口是什么意思,有没有大佬解释一下。
您是否碰巧读过 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
.