Apache Artemis has a powerful & flexible core which provides a foundation upon which other protocols can be implemented. Each protocol implementation translates the ideas of its specific protocol onto this core.
The broker ships with a client implementation which interacts directly with this core. It uses what’s called the "core" API, and it communicates over the network using the "core" protocol.
1. Supported Protocols
The broker has a pluggable protocol architecture. Protocol plugins come in the form of protocol modules. Each protocol module is included on the broker’s class path and loaded by the broker at boot time. The broker ships with 5 protocol modules out of the box.
1.1. AMQP
AMQP is a specification for interoperable messaging. It also defines a wire format, so any AMQP client can work with any messaging system that supports AMQP. AMQP clients are available in many different programming languages.
Any client that supports the AMQP 1.0 specification will be able to interact with Apache Artemis.
Please see AMQP for more details.
1.2. MQTT
MQTT is a lightweight connectivity protocol. It is designed to run in environments where device and networks are constrained. Any client that supports the 3.1, 3.1.1, or 5 specification will be able to interact with Apache Artemis.
Please see MQTT for more details.
1.3. STOMP
Stomp is a very simple text protocol for interoperating with messaging systems. It defines a wire format, so theoretically any Stomp client can work with any messaging system that supports Stomp. Stomp clients are available in many different programming languages. Any client that supports the 1.0, 1.1, or 1.2 specification will be able to interact with Apache Artemis.
Please see Stomp for more details.
1.4. OpenWire
ActiveMQ defines its own wire protocol: OpenWire. Any application using the OpenWire JMS client library shipped with ActiveMQ 5.12.x or higher can be used with Apache Artemis.
Please see OpenWire for more details.
1.5. Core
Artemis defines its own wire protocol: Core.
Please see Core for more details.
1.5.1. APIs and Other Interfaces
Although JMS and Jakarta Messaging are standardized APIs, they do not define a network protocol. The Artemis JMS & Jakarta Messaging clients are implemented on top of the core protocol. We also provide a client-side JNDI implementation.
2. Configuring Acceptors
In order to make use of a particular protocol, a transport must be configured with the desired protocol enabled. There is a whole section on configuring transports that can be found here.
The default configuration shipped with the distribution comes with a number of acceptors already defined, one for each of the above protocols plus a generic acceptor that supports all protocols.
To enable protocols on a particular acceptor simply add the protocols url parameter to the acceptor url where the value is one or more protocols (separated by commas).
If the protocols parameter is omitted from the url all protocols are enabled.
-
The following example enables only MQTT on port 1883
<acceptors> <acceptor>tcp://localhost:1883?protocols=MQTT</acceptor> </acceptors> -
The following example enables MQTT and AMQP on port 5672
<acceptors> <acceptor>tcp://localhost:5672?protocols=MQTT,AMQP</acceptor> </acceptors> -
The following example enables all protocols on
61616:<acceptors> <acceptor>tcp://localhost:61616</acceptor> </acceptors>
Here are the supported protocols and their corresponding value used in the protocols url parameter.
| Protocol | protocols value |
|---|---|
Core |
|
OpenWire |
|
AMQP |
|
MQTT |
|
STOMP |
|