This article outlines how to configure the JMS Connector using the Apache Qpid libraries to connect to Microsoft Azure Service Bus.
Provide the ability to publish and or retrieve messages to and from a Microsoft Azure Service Bus Queue for the purpose of message exchange with Dell Boomi AtomSphere.
The approach is to use the standard JMS Connector with a custom connection factory referencing components from the Apache Qpid™ project to integrate with an Azure Service Bus Queue. The approach consists of the following:
- Use the JMS Connector within a Dell Boomi AtomSphere integration process to LISTEN, GET or SEND documents. This example uses LISTEN.
- Utilize a JMS Server type of Generic JNDI which allows for a choice of JMS providers. This solution uses client libraries from Qpid JMS - Apache Qpid™.
- Locally managed property file contains all necessary connection details for the Azure Message Bus.
- A local Atom must be used to import third party libraries required by the connector.
The following steps detail how to deploy the JMS Connector with Azure Service Bus Queues.
- Download and the required JAR files to your Local Atom and restart the Atom.
- Obtain Service Bus Queue connection details from Microsoft Azure.
- Create a local properties file containing connection details for the Azure Service Bus Queue.
- Add a JMS Connector shape to your process.
- Create a JMS Connection component defining your own connection factory by referencing an initial context and provider path.
- Create a JMS Operation component that references the queue name specified in the properties file.
1. Atom Setup and Required Jars
Download and add the following jars to your local Atom under ../<atom_install_root>/userlib/jms. Restart the Atom.
- qpid-amqp-1-0-common-0.32.jar (http://repo1.maven.org/maven2/org/apache/qpid/qpid-amqp-1-0-common/0.32/qpid-amqp-1-0-common-0.32.jar)
- qpid-amqp-1-0-client-0.32.jar (http://repo1.maven.org/maven2/org/apache/qpid/qpid-amqp-1-0-client/0.32/qpid-amqp-1-0-client-0.32.jar)
- qpid-amqp-1-0-client-jms-0.32.jar (http://repo1.maven.org/maven2/org/apache/qpid/qpid-amqp-1-0-client-jms/0.32/qpid-amqp-1-0-client-jms-0.32.jar)
- geronimo-jms_1.1_spec-1.1.1.jar (http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.jar)
2. Obtain Service Bus Queue Details from Microsoft Azure
Navigate to the Service Bus menu item along the left of Microsoft Azure Portal:
Open your Queue and select Configure:
Note the Policy Name and Primary Key values under Shared Access Policies for use in the properties file configuration below.
The values will be concatenated together into an AMQPS connection string as such:
3. Create Local Properties File
Create a file named servicebus.properties on your Atom server. Note the full path for use in the JMS Connection configuration below.
- The connectionfactory.SERVICEBUSCONNECTIONFACTORY property with the AMQPS connection string from above
Add and configure a queue.[jndiName = [physicalName] line for each Azure queue you wish to connect
# Register a ConnectionFactory in JNDI using the form: # connectionfactory.[jndiName] = [ConnectionURL] connectionfactory.SERVICEBUSCONNECTIONFACTORY = amqps://sendpolicy:Y7f4gJbX1i4mYQbShhpFo0e8XuzPk1UHWEdLn9zHhPU%3D@dellboomibrian.servicebus.windows.net # Register some queues in JNDI using the form: # queue.[jndiName] = [physicalName] queue.QUEUE = samplequeue # queue.QUEUE2 = samplequeue2 # ...
4. Add a Connector Shape
Available actions include: LISTEN, GET and SEND
5. Create the Connection
- JMS Server Type = Generic JNDI
- Connection Factory JNDI Lookup = SERVICEBUSCONNECTIONFACTORY (connectionfactory.[jndiName] from properties file)
Initial Context Factory = org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory
- Provider URL = C:\boomi\servicebus.properties (full path including file name to properties file)
6. Create the Operation
For Destination use the queue.[jndiName] from servicebus.properties file:
Queue.QUEUE = samplequeue
- Processes cannot be deployed to the hosted Dell Boomi Atom Cloud because of the required external jar files.
- The same servicebus.properties file can be use for multiple deployed Service Bus Queues. An Atom restart is NOT required if you need to modify the properties to add additional queues for example.
- JMS Connector Operation settings should be reviewed for environment specific requirements.
- The naming conventions for Connection Factory Name, property file, and queue names used above are arbitrary.