Using the JMS Event Logger with Apache ActiveMQ
Important
You must have Apache ActiveMQ 5.14.5 or higher.You can use the JMS Event Logger with Apache ActiveMQ to process reporting events using a JMS queue.
To enable the JMS Event Logger with Apache ActiveMQ, edit the option delivery-protocol and set the value to jms.
Configuring JMS Event Logger with Apache ActiveMQ
- Configure Apache ActiveMQ, as described on the Apache website.
- Create a jndi.properties file with the following content:
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory java.naming.provider.url = tcp://activemq_host:61616 connectionFactoryNames = ConnectionFactory queue.InxEventLogQueue = InxEventLogQueue queue.inbound = inx.inbound queue.error = inx.error queue.processed = inx.processed queue.notification = inx.notification
ImportantThe value of queue.InxEventLogQueue refers to a queue name in your environment. - Pack the jndi.properties file in the root of amq-jndi.jar. You can use a ZIP archiving utility to pack the jndi.properties file.
- In the Interaction Server Application object, on the Applications Options tab, add the following jar files to the -Djava.class.path option in the jvm-options section:
- activemq-all-<version>.jar
- amq-jndi.jar
- log4j-api-<version>.jar (optional, refer to the Note below)
ImportantSince version 5.17.0 activemq-all also requires log4j-api library, refer to Maven Repository: org.apache.activemq » activemq-all for information about log4j-api version. The log4j-api-<version>.jar file is not supplied with Interaction Server and should be downloaded from public repositories (For example, Maven Repository: org.apache.logging.log4j » log4j-api). - Create the JMS Event Logger as a Database Access Point (DAP).
- Configure JMS Event Logger for connecting to Apache ActiveMQ by adding the following options in the logger-settings section:
- delivery-protocol=jms
- delivery-queue-name=InxEventLogQueue
- jms-connection-factory-lookup-name=ConnectionFactory
- jms-initial-context-factory=org.apache.activemq.jndi.ActiveMQInitialContextFactory
- jms-provider-url=tcp://activemq_host:61616
- reconnect-timeout=10
Important- Change the value of InxEventLogQueue to the queue value you set in the jndi.properties file.
- The value of jms-provider-url is the Apache ActiveMQ URL that corresponds to the <transportConnectorname> node from the activemq.xml file.
- Optionally, you can repeat the steps in this section to set up multiple JMS Event Loggers. With each additional logger, you must increment the name of additional queues as queue.InxEventLogQueue2 = InxEventLogQueue2 in the jndi.properties file.
- Add created JMS Event Loggers to Interaction Server connections.
Using TLS with Apache ActiveMQ
- Prepare the TLS certificates, as described in the Genesys Security Deployment Guide.
- Copy cert.jks and truststore.jks into the following folder: <Apache ActiveMQ installation directory>/conf.
- Open the file activemq.xml in the folder <Apache ActiveMQ installation directory>/conf and add the following lines:
<transportConnectors> ... <transportConnectorname="ssl"uri="ssl://0.0.0.0:61617?trace=true&needClientAuth=true"/> ... </transportConnectors> <sslContext> <sslContextkeyStore="file:${activemq.base}/conf/cert.jks" keyStorePassword="YourKeyStorePassword" trustStore="file:${activemq.base}/conf/truststore.jks" trustStorePassword="YourTrustStorePassword"/> </sslContext>
ImportantChange the values of keyStorePassword and trustStorePassword to acceptable passwords. - Restart ActiveMQ.
- Update the following configuration options in the logger-settings section:
- jms-initial-context-factory=org.apache.activemq.jndi.ActiveMQSslInitialContextFactory
- jms-provider-url=ssl://activemq_host:61617
- Add the following configuration options in the jms-additional-context-attributes section:
- connection.ConnectionFactory.keyStore=cert.jks
- connection.ConnectionFactory.keyStorePassword=keyStorePassword
- connection.ConnectionFactory.keyStoreType=jks
- connection.ConnectionFactory.trustStore=truststore.jks
- connection.ConnectionFactory.trustStorePassword=trustStorePassword
- connection.ConnectionFactory.trustStoreType=jks
ImportantChange the values of connection.ConnectionFactory.keyStorePassword and ConnectionFactory.trustStorePassword to the values you set in the activemq.xml file.
This page was last edited on October 27, 2023, at 04:25.
Comments or questions about this documentation? Contact us for support!