此内容没有您所选择的语言版本。

Chapter 14. Configuring the Transport


HornetQ has a fully pluggable and highly flexible transport layer. The transport layer defines its own Service Provider Interface (SPI) to simplify plugging in a new transport provider.
This chapter covers the concepts required to use and configure HornetQ transports.

14.1. Understanding Acceptors

Acceptors are defined in <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml using the following directives.
<acceptor name="netty">
   <factory-class>
org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
   <param key="host"  value="${jboss.bind.address:localhost}"/>
   <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
</acceptor>
Copy to Clipboard Toggle word wrap
Acceptors are always defined inside an acceptors element. Multiple acceptors can be defined in one acceptors element. There is no upper limit to the number of acceptors per server.
Each acceptor defines a way in which connections can be made to the HornetQ server.
The above example defines an acceptor that uses Netty to listen for connections on port 5445.
The acceptor element contains a sub-element factory-class which defines the factory used to create acceptor instances. In this case Netty is used to listen for connections, so the Netty implementation of AcceptorFactory is being used. The factory-class element determines which pluggable transport listens.
The acceptor element can also be configured with zero or more param sub-elements. Each param element defines a key-value pair. These key-value pairs are used to configure the specific transport, the set of valid key-value pairs depends on the specific transport be used and are passed straight through to the underlying transport.
Examples of key-value pairs for a particular transport would be, say, to configure the IP address to bind to, or the port to listen at.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat