ActiveMQ
ActiveMQ data ingestion is available using ingress of type activemq
.
Examples Repo
Example ActiveMQ configuration files showcasing all features we will discuss can be found in our Examples Repo .
Settings
The ActiveMQ settings
in the configuration file are used to configure data ingestion from ActiveMQ topics and queues.
Below is a detailed description of each field within the ActiveMQ settings
:
Field | Required | Configurable | Description |
---|---|---|---|
destination |
true |
true |
The topic or queue to ingress, starting with either topic:// or queue:// . |
contentType |
false |
true |
The content type of the message, accepted types: avro , json , recon , xml (default plaintext ). |
avroSchema |
false |
true |
The Avro schema for the message, required if using Avro serialization. |
useJndi |
false |
false |
Whether to use a JNDI properties file to configure the ActiveMQ client. |
ActiveMQ allows fields to be set using reflection, any field with a set
method on the ConnectionFactory
can be set within the settings
section of the ingress.
Here are a few example fields that become available:
Field | Required | Configurable | Description |
---|---|---|---|
brokerURL |
false |
true |
Connection URL used to connect to the ActiveMQ broker. |
clientID |
false |
true |
JMS clientID to use for the created connection. |
userName |
false |
true |
JMS userName used by connections created by this factory. |
JNDI
If you prefer to configure your ActiveMQ client using JNDI then you can.
Simply omit the destination
field and set the useJndi
field to true
.
This will generate a jndi.properties
file alongside your server.recon
, configure you connection and topic from there.
Message Structure
The message structure of received ActiveMQ messages is:
{ "id": ..., "value": {...} }
Example
The configuration below defines an ActiveMQ ingress where messages are consumed from the specified ActiveMQ topic and relayed to a singleton receiver agent.
{
"ingress": {
"type": "activemq",
"settings": {
"destination": "topic://test-topic",
"brokerURL": "tcp://host.docker.internal:61616"
},
"relay": {
"agent": "receiver"
}
}
}
Nstream is licensed under the Redis Source Available License 2.0 (RSALv2).