Using Shared Libraries in IIB v10

IBM Integration Bus v10 has introduced many new features. One of the important feature, from my point of view, is the introduction of Shared Library concept.

We all know that WebSphere Message Broker v8 provided new ways of organizing resources in toolkit by introducing

  • Application container, as per the info-center, is a container for all the resources that are required to create a solution.
    • Provides run-time isolation –> resources inside the application are not visible to other resources
    • Used when updates to one group of deployed resources should not affect another group of deployed resources
  • Library container, for organizing resources for re-usability. Can be referenced by applications or services or integration projects.
    • WMB v8 introduced Static library

The behavior of the library container introduced in WMB 8 and used in IIB v9, as per info-center are provided below

StaticLib

Drawback of Library used in WMB 8 / IIB 9: Owing to Application / Service’s run time isolation behavior, we solution developers faced major challenges on deciding whether to organize our solution using Applications / Services or using Integration Projects.When solutions were organized using Applications / Services and the reusable artifact(s), like Common Error Handling framework / logging framework, organized using libraries, each application / services carried copy of library within themselves. As a result, any changes made to these reusable artifact always resulted in need to re-deploy all applications / services.

In that regards, organizing the resources as Integration Projects was better and very much appealing.

But IIB v10 has addressed this concern / problem by introducing Shared Libraries. Now the Applications / Services do not take copy of the Shared Library within themselves. As the Shared Libraries are deployed directly at the Integration Server level.

Advantages of Shared Libraries

  1. Shared Libraries can be added to the BAR file independently of referencing Applications / Services
  2. Deployment of updated Shared Library results in the changes immediately picked up by all referencing applications / services at run-time. Hence no need to redeploy all referencing applications / services
  3. Enables using / referencing to multiple XML or DFDL schema files that declare the same elements and types, by having them stored in separate Shared Libraries

Reference: http://www.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bc23067_.htm?lang=en

SharedLib

Shared Library vs Static Library from Toolkit to Run-time

  • In the New Library window, specify the name for the library and selecting the library type as “Shared Library”, click FinishLoggerSL
  • Below Images shows the Shared and Static libraries in the toolkit

StaticVsShared

  • Referencing to Shared Library / Static library from Application is shown belowLibReferences
  • When adding to the BAR file, Shared Libraries are displayed in the BAR Editor separately and have to be selected explicitly for adding to the bar file. This is not the case with Static Library as they are added automatically when application referencing them is added to BAR file.

BAREditor

  • After deployment, you could notice the difference between Shared & Static library. Static library copy will be present within the application container, where as the Shared Library is outside the application container and directly under the Integration Server.

Runtime

Hope this blog provides insight into Shared Library feature of IIB 10.

For any corrections / suggestions / query please do drop a note to reachnebula@learnibmesb.com (or) reachnebula@gmail.com.

 

Advertisements

Pub/Sub in IBM Integration Bus v10 – Using built-in MQTT Server

As I had stated in my previous post, from IBM Integration Bus v10 MQ has been made optional. Those who have worked with earlier version of IIB / WMB might wonder

“What about the pub/sub feature of Integration Node / Broker?”

That’s because, till previous version, i.e. IBM Integration Bus v9, Integration Node was using the MQ’s publish/subscribe engine for all its pub/sub activities, like Event Monitoring etc.

Now with the change in the architecture from v10, Integration Node now comes with built-in MQTT broker thus allowing to use MQTT lightweight publish/subscribe messaging protocol. You could also choose to configure Integration Node to either use an external MQTT server or MQ’s queue manager as pub/sub broker asĀ  an alternative to default built-in MQTT server.

The built-in MQTT server is enabled by default for the Integration Node with the default port as 11883. The MQTTServer gets started automatically along with the Integration Node and also can be shared / used across multiple Integration Nodes.

To view the status of the MQTT server of an Integration Node you could use the following command

mqsireportproperties -b pubsub -o MQTTServer -n enabled

To view the port of the MQTT server of an Integration Node you could use the following command

mqsireportproperties -b pubsub -o MQTTServer -n port

Am going to focus on Event Monitoring, esp. Business Events on this blog to illustrate using built-in MQTT server in IIB v10 integration node SNABRK10.

The IIB Events can be broadly classified as shown below

IBM Integration Bus Events Classification

IBM Integration Bus Events Classification

Of the above 3 classification, if MQ is not installed, Integration node will publish both Operational & Admin events to the built-in MQTT broker by default. Business Events publication to built-in MQTT server is not enabled by default and hence has to be enabled using the following command

mqsichangeproperties SNABRK10 -b pubsub -o BusinessEvents/MQTT -n enabled -v true

To illustrate how to change the port of built-in MQTT server we will configure the Integration Node SNABRK10 to use the port 12885. To change the port use the following command

mqsichangeproperties SNABRK10 -b pubsub -o MQTTServer -n port -v 12885

Please note, message flow should be configured for emitting monitoring events (business events), which is not in the scope of this blog.

Assuming that the solution / message flow with monitoring enabled is deployed and activated, the message flow will publish the business events now to the built-in MQTT Server on port 12885 on the topic specified below

IBM/IntegrationBus/<IntNode>/Monitoring/<IntServer>/<MsgFlowName>/

To subscribe to these business events, we could then develop message flow using the built-in MQTT nodes MQTTSubcribe node, the configuration of which is shown below

IBM Integration Bus v10 - Using MQTTSubscribe

IBM Integration Bus v10 – Using MQTTSubscribe

Hope this provides overview about using built-in MQTT server of Integration Node in IIB v10. Please let me know your comments or any queries that will help me in refining my blogs and focus on areas of your concerns.

Looking forward to your feedbacks !!!

Installing IBM Integration Bus v10 on Linux

From IIB v10, IBM has removed the dependency of Integration Node / Broker on WebSphere MQ, by making it as optional product. Considering the operational dependency that Integration Node / Broker had on MQ in all its earlier version, I would say this is major architectural change for IIB. By doing so, what has happened is the reduction of number of components required to be installed.

In IIB v9, the number of components that were to be installed comprised of

  • IBM WebSphere MQ
  • IBM Integration Toolkit
  • IBM Integration Bus (Runtime Component)
  • IBM Integration Explorer
  • IE02 – ODBC Extender (not required for Windows though)

With IIB v10, the number of components to be installed has reduced to only 2, thus simplifying the entire process of installation

  • IBM Integration Toolkit
  • IBM Integration Bus (Runtime Component)

Now the installation package of IIB v10 comprises of single exe on windows. And on linux, there are no more installation to be performed but only extraction of the installation package. As part of installation, IE02 (ODBC Extender) also gets installed.

Also on linux, we have now have the option of Single User Installation (to be used only by one user) or as Shared Installation. Options has also been provided to covert the Single User installation to the Shared Installation at later stage too, if need be.

In this blog, I will be illustrating the steps for performing shared installation on Linux. Have used CentOS v7 for this illustration

  • Step 1: Login to the Linux server as root. Create a new directory IBM in the /opt folder.
IIB v10 Linux Installation - Creating IBM folder in /opt

IBM Integration Bus v10 Linux Installation – Creating IBM folder in /opt

  • Place the IIB v10 Linux installationĀ  archive into /opt/IBM folder as shown

    IBM Integration Bus v10 Linux Installation - Place installation file in /opt/IBM directory

    IIB v10 Linux Installation – Place installation file in /opt/IBM directory

  • Extract the installation package using tar command. Use –exclude option to omit IBM Toolkit installation,i.e. only to install IBM Integration Bus runtime component

tar -xzf 10.0.0.0-IIB-LINUX64-DEVELOPER.tar.gz –exclude iib-10.0.0.0/tools

IBM Integration Bus v10 Linux Installation - Extract the package using tar command into /opt/IBM

IBM Integration Bus v10 Linux Installation – Extract the package using tar command into /opt/IBM

  • For shared installation, group mqbrkrs and /var/mqsi folder needs to be created. Run the following command to accept the license as well create the requisite folders and groups

./iib make registry global accept license silently

IBM Integration Bus v10 Linux Installation - Creating shared Installation

IBM Integration Bus v10 Linux Installation – Creating shared Installation

  • The above step creates the group mqbrkrs, if not existing, and the /var/mqsi folder. Verify the same as shown below
IBM Integration Bus v10 Linux Installation - Verifying group mqbrkrs & /var/mqsi creation

IBM Integration Bus v10 Linux Installation – Verifying group mqbrkrs & /var/mqsi creation

IBM Integration Bus v10 Linux Installation - Verifying /var/mqsi creation

IBM Integration Bus v10 Linux Installation – Verifying /var/mqsi creation

  • To verify the installation, navigate to /opt/IBM/iib-10.n.n.n and run the following command
IBM Integration Bus v10 Linux Installation - Verifying Installation - Part 1

IBM Integration Bus v10 Linux Installation – Verifying Installation – Part 1

IBM Integration Bus v10 Linux Installation - Verifying Installation - Part 2

IBM Integration Bus v10 Linux Installation – Verifying Installation – Part 2

This completes the installation of IIB v10 on Linux. Next steps would be to create IIB user account and configure the user profile for running IIB commands. This could be done by editing the .bash_profile file of the user and adding the following statement to it.

. /opt/IBM/iib-10.0.0.0/server/bin/mqsiprofile