Skip to main content
Loading

The jms section of aerospike-jms-outbound.yml

The jms section configures the properties of connections to the JMS message broker.

By default, the connector supports the following JMS message brokers:

  • IBM MQ
  • Solace
  • ActiveMQ Artemis
  • RabbitMQ

See the Examples section for examples of the jms section of each of these message brokers.

Procedure

Specify message broker properties

Use the following options to set the values of the properties that the connector must use when connecting to the JMS message broker:

OptionRequiredDefaultDescription
factoryyesThe name of the connection factory. Will be specific to the message broker being used.
jndi-cf-namenoThe name of the JNDI factory configured at the message broker.
specno1.0The JMS specification the message broker supports.
confignoThis section lists the configuration parameters to be passed to the connection factory. The parameters that you must use depend on which JMS message broker you want to connect to.
import-config-filenoA file from which to import additional configuration parameters. This should be used for sensitive configuration parameters, such as security credentials. These parameters are merged with those in the config section.
max-connectionsno1The maximum number of JMS connections to establish to the JMS message broker.
max-sessions-per-connectionno1The maximum number of JMS sessions to open per JMS connection.

Here is an example of using the import-config-file property. Suppose that your jms section for making a connection to RabbitMQ looks like this:

jms:
factory: com.rabbitmq.jms.admin.RMQConnectionFactory
config:
host: 10.0.2.34
port: 5672
import-config-file: credentials.yml

You use the property import-config-file and point to the file credentials.yml, which contains this content:

  • The imported credentials file
# credentials.yml
username: guest
password: guest

At runtime, the content of credentials.yml is merged into the config section:

jms:
factory: com.rabbitmq.jms.admin.RMQConnectionFactory
config:
host: 10.0.2.34
port: 5672
username: guest
password: guest

Specify authorization credentials

The configuration parameters that you use to specify the authentication information that the JMS connector uses to connect to JMS message brokers differ according to the message broker.

Authenticating to IBM MQ

Use the credentials section to provider a username and path to a file that contains the corresponding password.

PropertyRequiredDescription
usernameyesThe username to use for connecting
password-fileyesThe file containing the password. Everything in the file after the first newline is ignored. Trailing spaces in the first line are not ignored.

Authenticating to Solace or Active MQ Artemis

In the config section, you must provide values for two properties required for authenticating to LDAP by using the Java Naming and Directory Interface (JNDI).

PropertyRequiredDescription
java.naming.security.principalyesSpecifies the name of the user/program doing the authentication and depends on the value of the Context.SECURITY_AUTHENTICATION property that you have set in Solace or Active MQ Artemis.
java.naming.security.credentialsyesSpecifies the credentials of the user/program doing the authentication and depends on the value of the Context.SECURITY_AUTHENTICATION property that you have set in Solace or Active MQ Artemis.

Authenticating to RabbitMQ

In the config section, you must provide properties that correspond to the authentication mechanism that you have set up in RabbitMQ. For example, if RabbitMQ is configured for SASL PLAIN authentication, then you must provide values for the properties username and password.

Examples

IBM MQ

jms:
factory: com.ibm.mq.jms.MQConnectionFactory
spec: 2.0
config:
hostName: 10.0.2.5
port: 1414
queueManager: QM1
transportType: 1
channel: DEV.APP.SVRCONN
credentials:
username: admin
password-file: /path/to/password/file.txt

Solace

jms:
factory: com.solacesystems.jndi.SolJNDIInitialContextFactory
jndi-cf-name: /JNDI/CF/Aerospike
config:
java.naming.provider.url: 10.0.1.54:55555
java.naming.security.principal: username@jms-inbound-test
java.naming.security.credentials: password
import-config-file: credentials.yml

ActiveMQ Artemis

jms:
factory: org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
jndi-cf-name: ConnectionFactory
config:
java.naming.provider.url: tcp:/10.2.54.1:61616?user=artemis&password=simetraehcapa
java.naming.security.principal: artemis
java.naming.security.credentials: simetraehcapa
max-connections: 32
max-sessions-per-connection: 8

RabbitMQ

jms:
factory: com.rabbitmq.jms.admin.RMQConnectionFactory
config:
host: 10.0.2.34
port: 5672
username: guest
password: guest