17
© Solace Corporation. http://www.solace.com Integrating IBM Integration Bus with Solace PubSub+

Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

  • Upload
    others

  • View
    25

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

© Solace Corporation. http://www.solace.com

Integrating IBM Integration Bus with Solace PubSub+

Page 2: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

2

Table of Contents Integrating IBM Integration Bus with Solace PubSub+ ............................................................... 1 Table of Contents ....................................................................................................................... 2 Overview .................................................................................................................................... 3

Related Documentation ..................................................................................................................................................... 3 Integrating Solace with IBM Integration Bus .............................................................................. 4

Step 1 – Configure Solace PubSub+................................................................................................................................... 5 Creating a Message VPN ............................................................................................................................................................................... 5 Configuring Client Usernames & Profiles .................................................................................................................................................... 5 Setting up Guaranteed Messaging Endpoints ............................................................................................................................................... 6 Setting up Solace JNDI References ............................................................................................................................................................... 6

Step 2: Configure IBM Integration Bus V10 ..................................................................................................................... 8 Solace JMS Dependencies ............................................................................................................................................................................. 8

Step 3 – IBM Integration Bus: Create an IIB Integration Node ........................................................................................... 9 Step 4 – IBM Integration Bus: Create JMS Configurable Service “Solace” ....................................................................... 10

Option 1: Manual Entry............................................................................................................................................................................... 11 Option 2: Import from file........................................................................................................................................................................... 11

Step 5 – Create IIB flows to send messages to/from Solace............................................................................................... 13 Appendix – Sample IIB flows using Solace JMS .............................................................................................................. 17

Page 3: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

3

Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus (ESB) that offers a fast, simple way for systems and applications to communicate with each other.

This document focuses on the technical steps required to integrate Solace PubSub+ as a Java Message Service (JMS) provider with IBM Integration Bus v10. The target audience of this document is developers using IBM Integration Bus with knowledge of both IBM Integration Bus and JMS in general. For detailed background on either Solace JMS or IBM Integration Bus, please refer to the referenced documents below.

Related Documentation These links contain information related to this guide:

• Solace Developer Portal • Solace Messaging API for JMS • Solace JMS API Online Reference Documentation • Solace Feature Guide • Solace Message Router Configuration • Solace Command Line Interface Reference • IBM Integration Bus 10.0.0 Product Documentation • IBM Integration Bus Configurable Services

Page 4: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

4

Integrating Solace with IBM Integration Bus This integration guide demonstrates how to configure IBM Integration Bus to send and receive JMS messages using Solace as a JMS provider.

Accomplishing this requires completion of the following steps:

Step 1 – Install and configure Solace PubSub+ Message Router • Create a message VPN, Username and Password • Create Solace JMS/JNDI resources (connection factory, JMS Queues/Topics etc.)

Step 2 – Configure IBM Integration Bus V10

• Copy Solace JMS API client library files to MQSI/shared-classes folder o Linux and UNIX: var/mqsi/shared-classes o Windows: C:\ProgramData\IBM\MQSI\shared-classes

Step 3 – Create an IIB Integration Node Step 4 - Create a new IIB Configurable Service with Solace as the JMS provider

Step 5 – Create IIB flows to send messages to/from Solace

Page 5: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

5

Step 1 – Configure Solace PubSub+ Solace PubSub+ needs to be configured with the following configuration objects at a minimum to enable JMS to send and receive messages within IBM Integration Bus.

• A Message VPN, or virtual message broker, to scope the integration on Solace PubSub+. • Client connectivity configurations like usernames and profiles • Guaranteed messaging endpoints for receiving messages. • Appropriate JNDI mappings enabling JMS clients to connect to Solace PubSub+ configuration.

For reference, the CLI commands in the following sections are from SolOS version 7.2 but will generally be forward compatible. For more details related to Solace PubSub+ CLI see Solace Command Line Interface Reference. Wherever possible, default values will be used to minimize the required configuration. The CLI commands listed also assume that the CLI user has a Global Access Level set to Admin. For details on CLI access levels please see Solace Feature Guide section “User Authentication and Authorization”.

Also note that this configuration can also be easily performed using SolAdmin, Solace’s GUI management tool, or Solae WebUI. This is in fact the recommended approach for configuring Solace PubSub+. This document uses CLI as the reference to remain concise.

Creating a Message VPN

This section outlines how to create a message-VPN called “default” on Solace PubSub+ with authentication disabled and 2GB of message spool quota for Guaranteed Messaging. This message-VPN name is required in the configuration when connecting to Solace PubSub+. In practice appropriate values for authentication, message spool and other message-VPN properties should be chosen depending on the end application’s use case.

(config)# create message-vpn default (config-msg-vpn)# authentication (config-msg-vpn-auth)# user-class client (config-msg-vpn-auth-user-class)# basic auth-type none (config-msg-vpn-auth-user-class)# exit (config-msg-vpn-auth)# exit (config-msg-vpn)# no shutdown (config-msg-vpn)# exit (config)# (config)# message-spool message-vpn default (config-message-spool)# max-spool-usage 2000 (config-message-spool)# exit (config)#

Configuring Client Usernames & Profiles

This section outlines how to update the default client-profile and how to create a client username for connecting to Solace PubSub+. For the client-profile, it is important to enable guaranteed messaging for JMS messaging and transacted sessions if using transactions.

The chosen client username of “client-user” will be required by IIB when connecting to Solace PubSub+.

(config)# client-profile default message-vpn default (config-client-profile)# message-spool allow-guaranteed-message-receive (config-client-profile)# message-spool allow-guaranteed-message-send (config-client-profile)# message-spool allow-transacted-sessions (config-client-profile)# exit

Page 6: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

6

(config)# (config)# create client-username client-user message-vpn default (config-client-username)# acl-profile default (config-client-username)# client-profile default (config-client-username)# no shutdown (config-client-username)# exit (config)#

Setting up Guaranteed Messaging Endpoints

This integration guide shows publishing messages to a queue consumed by IIB and receiving messages from a queue published by IIB application. For illustration purposes, these queues are chosen to be an exclusive queue with a message spool quota of 2GB matching quota associated with the message VPN. The queue name chosen are “IIB_Q1” and “IIB_Q2”.

(config)# message-spool message-vpn default (config-message-spool)# create queue IIB_Q1 (config-message-spool-queue)# access-type exclusive (config-message-spool-queue)# max-spool-usage 2000 (config-message-spool-queue)# permission all delete (config-message-spool-queue)# no shutdown (config-message-spool-queue)# exit (config-message-spool)# exit (config)# (config)# message-spool message-vpn default (config-message-spool)# create queue IIB_Q2 (config-message-spool-queue)# access-type exclusive (config-message-spool-queue)# max-spool-usage 2000 (config-message-spool-queue)# permission all delete (config-message-spool-queue)# no shutdown (config-message-spool-queue)# exit (config-message-spool)# exit (config)#

Setting up Solace JNDI References

To enable the JMS clients to connect and look up the Queue destination required by Solace application, there are two JNDI objects required on Solace PubSub+:

Page 7: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

7

• A connection factory: /jms/cf/default • A queue destination: JNDI/Q/IIB_Q1 • A queue destination: JNDI/Q/IIB_Q2

They are configured as follows:

(config)# jndi message-vpn default (config-jndi)# create connection-factory /jms/cf/default (config-jndi-connection-factory)# property-list messaging-properties (config-jndi-connection-factory-pl)# property default-delivery-mode persistent (config-jndi-connection-factory-pl)# exit (config-jndi-connection-factory)# property-list transport-properties (config-jndi-connection-factory-pl)# property direct-transport false (config-jndi-connection-factory-pl)# property "reconnect-retry-wait" "3000" (config-jndi-connection-factory-pl)# property "reconnect-retries" "20" (config-jndi-connection-factory-pl)# property "connect-retries-per-host" "5" (config-jndi-connection-factory-pl)# property "connect-retries" "1" (config-jndi-connection-factory-pl)# exit (config-jndi-connection-factory)# exit (config-jndi)# (config-jndi)# create queue JNDI/Q/IIB_Q1 (config-jndi-queue)# property physical-name IIB_Q1 (config-jndi-queue)# exit (config-jndi)# (config-jndi)# no shutdown (config-jndi)# (config-jndi)# create queue JNDI/Q/IIB_Q2 (config-jndi-queue)# property physical-name IIB_Q2 (config-jndi-queue)# exit (config-jndi)# (config-jndi)# no shutdown (config-jndi)# exit (config)#

Page 8: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

8

Step 2: Configure IBM Integration Bus V10

Solace JMS Dependencies

1) Copy Solace JMS API client library files to %MQSI%/shared-classes folder

Solace JMS libraries can be obtained on Solace Developer Portal Downloads or from Maven Central. The easiest way to integrate Solace and IIB is using the client libraries available via public Maven Central. You can download the libraries into a directory and reference them directly, the following resources are all required:

Resource Value Description

SolaceCommon sol-common-VERSION.jar Solacecommonutilitieslibrary.

SolaceJCSMP sol-jcsmp-VERSION.jar UnderlyingSolacewirelinesupportlibraries.

SolaceJMS sol-jms-VERSION.jar SolaceJMS1.1compliantlibraries.

ApacheCommonslanguage commons-lang-2.6.jar Commonlanguagelibraries.

ApacheCommonslogging commons-logging-1.2.jar Commonlogginglibraries

ApacheLog4j2Core log4j-core-2.8.2.jar log4j2corelibraries

ApacheLog4j2API log4j-api-2.8.2.jar log4j2APIlibraries

2) Copy files to %MQSI_WORKPATH%/shared-classes directory

Ex. var/mqsi/shared-classes (Linux/Unix) or C:\ProgramData\IBM\MQSI\shared-classes (Windows)

Page 9: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

9

Step 3 – IBM Integration Bus: Create an IIB Integration Node IBM Integration Toolkit -> “Integration Nodes” panel (bottom left)

1) Right click on “Integration Nodes”-> “New” -> ”Local Integration Node” (or connect to remote

integration node)

2) Specify <New Integration Node Name> and “Default integration server name” and click “Finish”

Page 10: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

10

3) Right click on “New Integration Node” -> “Start Web User Interface”

Step 4 – IBM Integration Bus: Create JMS Configurable Service “Solace” In the IIB WebUI, create a new JMS Configurable Service to connect to Solace. This can be done manually, or by importing a “*.configurableservice” file. Either way, the following 5 properties will need to be set:

Name Value Example

jarsURL %MQSI_WORKPATH%/shared-classes C:\ProgramData\IBM\MQSI\shared-classes (Win) /var/mqsi/shared-classes (Linux/Unix)

jndiBindingsLocation smf://<IP_address>:<port> smf://xxx.xxx.xxx.xxx:55555

jndiEnvironmentParms java.naming.security.principal=<username>;java.naming.security.credentials=<password>

jndiEnvironmentParms="java.naming.security.principal=solace-cloud-client@msgvpn-3b9bcv5oi1l; java.naming.security.credentials=qaoqlhld998m6v6sl4agn50o97"

connectionFactoryName <JMSconnectionFactory> /jms/cf/default .

initialContextFactory com.solacesystems.jndi.SolJNDIInitialContextFactory

com.solacesystems.jndi.SolJNDIInitialContextFactory

Page 11: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

11

Option 1: Manual Entry 1) On the Web User Interface, select “New Integration Node” -> “Operational Policy” -> “Configurable

Services”

2) On the “Configurable Services” dropdown, select “Create”

3) On the “New Configurable Service” Overview panel, specify

a. Name: “SolaceJMS” b. Type: select “JMSProviders” from the dropdown c. Template: leave “ActiveMQ” (as a starting point for further customization)

4) On the “New Configurable Service” Properties panel, override the defaults for the 5 properties listed in

the table above.

Option 2: Import from file 1) Create Configurable Service import file ”solace.configurableservice”

As highlighted in DARK RED below, review and modify the 5 properties listed in the table above as needed to reflect your environment.

<?xml version="1.0" encoding="UTF-8"?> <configurableservice csName="SolaceJMS" csType="JMSProviders" jarsURL="C:\ProgramData\IBM\MQSI\shared-classes" connectionFactoryName="/jms/cf/default" initialContextFactory="com.solacesystems.jndi.SolJNDIInitialContextFactory" jndiBindingsLocation="smf://vmr-mr8v6yiwieih.messaging.solace.cloud:20128" jndiEnvironmentParms="java.naming.security.principal=solace-cloud-client@msgvpn-3b9bcv5oi1l;java.naming.security.credentials=qaoqlhld998m6v6sl4agn50o97" nativeLibs="default_Path" clientAckBatchTime="0" clientAckBatchSize="0"

Page 12: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

12

jmsProviderXASupport="false" jmsAsyncExceptionHandling="false" proprietaryAPIHandler="default_none" jndiEnvironmentObject="default_none" jndiEnvironmentObjectParm1="default_none" jndiEnvironmentObjectParm2="default_none" jndiEnvironmentObjectParm3="default_none" jndiEnvironmentObjectParm4="default_none" jndiEnvironmentObjectParm5="default_none" proprietaryAPIAttr1="default_none" proprietaryAPIAttr2="default_none" proprietaryAPIAttr3="default_none" proprietaryAPIAttr4="default_none" proprietaryAPIAttr5="default_none" />

2) On the Web User Interface, select “New Integration Node” -> “Operational Policy” -> “Configurable

Services”

3) On the “Configurable Services” dropdown, select “Import *.configurableservice”

4) Browse to select “solace.configurableservice” and click “OK”

Page 13: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

13

Step 5 – Create IIB flows to send messages to/from Solace In IBM Integration Bus Toolkit:

Page 14: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

14

1) File -> New -> Application 2) Specify <application name> and click “Finish”

3) “New” -> “Message Flow”; enter < Message Flow Name > and click “Finish”

Page 15: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

15

Drag/drop icons from palette (ex. JMSInput, JMSOutput) & wire together This example illustrates how IIB JMSInput and JMSOutput nodes can use Solace as the underlying JMS provider. Since the main focus of this sample is show the IIB+Solace integration, this very simple flow will use a JMSInput node which receives messages from Q1 on Solace (“JNDI/Q/IIB_Q1”) and moves these to a JMSOutput node mapped to Destination Queue of Q2 (“JNDI/Q/IIB_Q2”). In Palette, expand “JMS” section 4) Select the ”JMSInput” node and drag/drop it onto the Flow Editor. Repeat for “JMSOutput” node, and

wire together.

5) With the “JMSInput” icon selected, use the “Properties” view to configure the JMSInput Node

a. “Basic” tab: specify <source queue> or <subscription topic>

b. “JMS Connection” tab: JMS provider name: type in “Solace” (or whatever name you gave the JMS Configurable Service in Step 4)

Page 16: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

16

Note: The other fields are optional and will be automatically picked up from the “Solace” JMS configurable service. However, you can override those defaults by explicitly specifying these values on this tab.

6) Repeat for “JMSOutput” Node.

With the “JMSOutput” icon selected, use the “Properties” view to configure the JMSOutput Node

a. “Basic” tab: specify <source queue> or <subscription topic>

b. “JMS Connection” tab: JMS provider name: type in “Solace” (or whatever name you gave the JMS Configurable Service in Step 4)

Note: The other fields are optional and will be automatically picked up from the “Solace” JMS configurable service. Again, you can override those defaults by explicitly specifying these values on this tab.

Page 17: Integrating IBM Integration Bus with Solace PubSub+...Integrating Solace with IBM Integration Bus V10 3 Overview IBM Integration Bus (IIB) is a market-leading Enterprise Service Bus

IntegratingSolacewithIBMIntegrationBusV10

17

Appendix – Sample IIB flows using Solace JMS

• SolaceJMS to SolaceJMS • SolaceJMS to MQ • MQ to SolaceJMS • IIB+Solace HA failover