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
factoryyesName of the connection factory. Will be specific to the message broker being used.
jndi-cf-namenoName of the JNDI factory configured at the message broker.
specno1.0JMS specification the message broker supports.
confignoLists 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-filenoFile from which to import additional configuration parameters. Use for sensitive configuration parameters, such as security credentials. These parameters are merged with those in the config section.
max-connectionsno1Maximum number of JMS connections to establish to the JMS message broker.
max-sessions-per-connectionno1Maximum 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
usernameyesUsername to use for connecting
password-fileyesFile containing the password. Everything 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