Search

Chapter 14. Configuring the Transport

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

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.