Application Integration With IBM ESB

PUB-SUB Pattern in Message Broker

| Comments

Scenarios where to use pub-sub pattern

* Where multiple receivers depend on same senders
* Scnarios with large number of senders and receivers
* Frequent and dynamic changes between senders and receivers

Components needed to build pub-sub flow

  • Publisher flow: this consists of any input node with publisher string and ‘Publisher’ keyword specified in transformation nodes or on MQ input node if MQ is an input node and publisher node

  • Publisher and subscriber definition on MQ explorer

  • Pubscriber flow with MQ input node which is a must have

message pulication flow

here we’re using file input node to publish the message so we need to be careful the ordering of MQMD, MQRFH2 and message body from top to bottom, if not the flow throws exception

create topic in mq explorer

create subcribtion in mq explorer and configure queue listeners

message subscribtion flow

download source code

Comments