Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Upload RabbitMQ JMS Client Libraries

To enable RabbitMQ connections the RabbitMQ JMS libraries have to be uploaded to estar/tpe/dynamic/mc2/sharedlibs

Only RabbitMQ JMS client libraries version 2.x are supported, 3.x is not supported.

The libraries can be downloaded from here:

https://repo1.maven.org/maven2/com/rabbitmq/jms/rabbitmq-jms/2.9.0/rabbitmq-jms-2.9.0.jar

https://repo1.maven.org/maven2/com/rabbitmq/amqp-client/5.19.0/amqp-client-5.19.0.jar

Create a JMS Connection Configuration File

Add a .json file to estar/tpe/dynamic/mc2/eaglejms/connections, for example connections-rabbitmq.json

This is an example of the file:

Code Block
languagejson
{
"Region": "DBName from cfg/db_connection.ini",
"Connections": [
  {
  "ConnectionName": "rabbitmq-myserver",
  "ComponentName": "rabbitmqssl",
  "SSLVersion": "TLSv1.2",
  "Parameters": {
    "virtualHost": "/",
    "host": "rabbitmqhost",
    "port": "5672"
    }
  }
]
}

The following parameters should be specified:

RegionName - the region on which MC2 is running. This should be retrieved from cfg/db_connection.ini DBName parameter in [primary] section.

ConnectionName - a unique connection name. The same connection name will be used in the Stream Configuration in Message Center Console.

ComponentName - should be rabbitmq if no SSL will be used or rabbitmqssl if SSL will be used

SSLVersion - set to TLSv1.2, or a value supported by SSLContext.getInstance in Java

Parameters - a list of parameters supported by RMQConnectionFactory

host - the host name on which RabbitMQ is running

port - the AMQP port (ssl or plain) RabbitMQ is running

virtualHost - the virtual host to use

Configure SSL Certificates

The keystore for RabbitMQ (JMS) should be created in estar/tpe/dynamic/mc2/private/eaglejms/eagle-keystore.jks

The trustore containing RabbitMQ certificates should be created in estar/tpe/dynamic/mc2/private/eaglejms/eagle-truststore.jks

Create the files/folders if not exist.

If the location has to be changed it can be done in the connections configuration file by adding an SSLTruststoreFile and SSLKeystoreFile parameters:

Code Block
languagejson
{
"Region": "DBName from cfg/db_connection.ini",
"Connections": [
  {
  "ConnectionName": "rabbitmq-myserver",
  "ComponentName": "rabbitmqssl",
  "SSLVersion": "TLSv1.2",
  "SSLTruststoreFile": "full path to truststore.jks file",
  "SSLKeystoreFile": "full path to keystore.jks file",
  "Parameters": {
    "virtualHost": "/",
    "host": "rabbitmqhost",
    "port": "5672"
    }
  }
]
}

The keystore and truststore should have the same password.

Create an MC2JMS stream

Use Message Center Console to create an MC2JMS stream. The stream should have:

  1. Instance set to 10000

  2. Delivery Method set to MC2JMS

  3. Connection Name - the ConnectionName parameter from the JSON file, for example in the above it is rabbitmq-myserver

  4. DestinationType - Queue or Topic

  5. Destination Name - the name of the queue or topic

  6. Sequential Reading - set to yes only if the processing sequence is important. In this case, the messages will be processed one by one.

  7. JMS Connection User- the user id to use for connection

  8. JMS Connection Password - the password to use for connection

  9. Concurrent Consumers - number of concurrent consumers per MC2 worker. Setting to a higher value will increase the performance - more messages will be processed in parallel.

  10. URI Parameters - this is an advanced parameter string. It is an URI string, the parameters are defined in Apache Camel JMS Component documentation: https://camel.apache.org/components/3.21.x/jms-component.html Do not add this parameter unless there is a real need for it.

  11. SSL Keystore Password - this is the keystore and truststore password.

After the configuration files are changed and/or JMS Jar files are being dropped to sharedlibs folder MC2SERVICES (extractservice) must be restarted. There is no need to restart other MC2 services (kafka and redis).