MSMQ Demonstration Example


This example discusses how TIBCO ActiveEnterprise applications can be integrated with Microsoft's message queuing product - MSMQ, using TIBCO Adapter for COM. You must be familiar with COM, MSMQ, TIBCO adapters and TIBCO BusinessWorks concepts to be able to successfully run this example. See the MSDN documentation for further details on Message queuing COM components.

The adapter enables seamless integration of TIBCO applications with applications running on the Microsoft platform through the COM interfaces exposed by these applications. The functionality offered by MSMQ can be accessed via its COM interface, and this helps the adapter to implement an integration solution that bridges TIBCO applications such as TIBCO BusinessWorks or other TIBCO Adapters with MSMQ.

Architecture

Figure 6 provides a high-level conceptual overview of the various pieces involved in this example:

Figure 6 Architecture

As seen in the figure, the example setup comprises of the following components:

MSMQMessageSender COM component: This COM component is invoked by the service component of the adapter. The service component of the adapter creates an instance of the MSMQMessageSender component, and listens for messages corresponding to this component. When a message is received, the service translates it to the appropriate method call on the MSMQMessageSender component. The MSMQMessageSender component then inspects the parameters passed to the method invocation; creates a corresponding MSMQ message and places it in an MSMQ queue.

MSMQMessageReceiver COM component: This component implements the notification call back interface required by MSMQ. MSMQ invokes a method on this component when a message is placed in an MSMQ queue. When the call back is called by MSMQ, this component uses the MSMQMessagePublisher COM component to publish a corresponding TIBCO Message.

MSMQMessagePublisher component: This component is used by the MSMQMessageReceiver component to publish messages on the TIBCO messaging transport. On receiving an MSMQ message that has been placed in the queue, the MSMQMessageReceiver component will invoke a method on the MSMQMessagePublisher component. This method invocation is intercepted by the interceptor component of the adapter. The interceptor component then marshals the method parameters passed to this call into a message, and sends the message over the TIBCO messaging transport.

Example Scenario

On posting a message to the source queue, the MSMQMessageReceiver component is called by MSMQ. This component, in turn, invokes a method on the MSMQMessagePublisher component. When the method on the MSMQMessagePublisher component is invoked, the interceptor component of the adapter intercepts this invocation and this message is then published on the TIBCO messaging transport.

TIBCO BusinessWorks receives the message from the TIBCO messaging transport, suitably maps the message to be written on to a destination queue and publishes it to the TIBCO messaging transport.

The subscription service of the adapter receives the message from the TIBCO transport and converts it automatically into an invocation of a method on the MSMQMessageSender COM component. The MSMQMessageSender component will then inspect the parameters passed to the method invocation, create a corresponding MSMQ message, and place it in the destination MSMQ queue.


TIBCO Adapter™ for COM User’s Guide
Software Release 5.3, September 2005
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com