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

WebService Develpment Using HTTP Node

| Comments

WebService Provider with HTTP Input Node

I’ll try to show webservice provider development using HTTP node. in this example I’ve tried to expose webservice using HTTP node. since we’ve to construct(write tedious codes) for multiple namespaces for the envelope and subsequent nodes, it’s more prefered to use generate WSDL/XSD wizard to extract SOAP envelope. key note ! port number 7080 is the default for listening webservice request.

As you can see, the lines of codes in compute node is tedious and we need to be careful when we write coding

WebService Consumer with HTTP Request Node

This message flow doesn’t do any fancy thing, it just connects to webservice provider above, consumes the data passes over to the compute node. and compute node copies inbound message to outbound terminal without any transformation.

Testing with SOAPUI

In this example, bank customer tries to login into his bank account and sees his credit and debit information. the first data he enters: username, password are credentail data for webservice request. and detailed information; customer name, checking account and saving account are returned as webservice response data.

download source code

SOAP Node vs HTTP Node

| Comments

We can use SOAP nodes with SOAP message domain OR HTTP transport nodes with XMLNSC message domain to implement Web Services. Several advantages exist if we use SOAP nodes:

  • Support for WS-Addressing, WS-Security and SOAP headers.
  • A common SOAP logical tree format, independent of the bitstream format.
  • Runtime checking against WSDL.
  • Automatic processing of SOAP with Attachments (SwA). (Although the HTTP nodes can process SwA messages, we must use the MIME message domain)
  • Automatic processing of Message Transmission Optimization Mechanism (MTOM).

Cases where it might be better to use HTTP nodes include:

  • Message flows that interact with Web services that use different standards, such as REST or XML-RPC. (We don’t have a WSDL definition)
  • Message flow that never use WS-Addressing, WS-Security, SwA, or MTOM.

Working With EmailOutput Node Static Configuration

| Comments

We start this serious of discussion with SMTP server. SMTP server is a type of server which is used to relay or send email message to the next or final destination SMTP server. so basically, it accepts email message from client application for example from outlook express or simply throuh telnet and sends to the next hop or remote end SMTP server, which finally the reciver consumes the message from.

To enhance rapid wmb devevelpment I’ve introduced here pseudo SMTP server. this server is used as local message browser using local queue where we can browse email sent by email node or any application. and it woudn’t send message to actual destination.

To see this in action, download tiny SMTP server application available at: download app here and run it. Then configure emailoutput node as marked in blue color below:

upon deploying the project and excuting the project, since input message tag is not properly close, the test should fail and sends email notification to subscribed admins in the local pseudo queues show below:

click inspect button to see the message

download source code

Physical vs Logical Message

| Comments

The difference between physical message and logical message is that physical message is something like XML and Cobol copybook or any text files. when physical data arrives at input node for example, input message queue, we have to configure the node property with appropriate parser like XMLNSC. This parser converts physical data to logical data which is understandable by the enterior nodes or embeded languages ESQL & JAVA. Then these language can traverse logical tree message and do transformation as needed.

In our example the physical data is xml file which has account information with person first and last name. and the parser is XMLNSC configured on input queue node. then internally we can retrieve information starting by XMLNSC.Account.fname etc.

This project shows how to transform simple account information to a physical message but with different nodes.

on the input node, we need to specify the parser “XMLNS”

This shows logical representation of message as it traverses message flow

Finally we get physcial transformed data

download source code

Basics of Message Broker Toolkit

| Comments

  1. This is the side pane: in this pane we can create application, message flow, BAR files, message model, message set and etc

  2. Is a section of the toolkit where we can choose different types of nodes to create message flow. for example, compute node, database node, filter node and etc.

  3. Content pane: in this pane we build our message flow using nodes links and etc.

  4. This pane contains one or more Broker instances, and one or more execution group.

  5. In this pane we can set properties for the nodes, we can brows deployment logs and see some troubleshooting informations. test