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 !!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s