Using the MQePubMsgObject

This migration uses the MQe bridge instead of the MQe broker node and avoids the use of any deprecated MQe classes.

The following work is required:
  1. Modify the message flow on the broker such that MQ input/output nodes are used instead of MQe input/output nodes.
  2. Modify the client application such that all references to the MQeMbMsgObject class are removed and replaced by use of the MQePubSubMsgObject class. The mapping between these two classes and their respective methods is fairly obvious; the MQePubSubMsgObject is easier to use for pub/sub operations because it contains explicit methods for these functions. Setting of any MQ MQMD parameters is very similar in both objects, with minor differences in method names and return types.

    One key difference is that the client application will have sent all its messages to the same queue (i.e. the broker MQe input node); intelligence in the node then determined the correct destination. The application must now send any subscribe and unsubscribe messages to the broker’s control queue SYSTEM.BROKER.CONTROL.QUEUE, whilst publication messages must now be sent to the input queue of the appropriate message flow (this flow will contain a Publication node).

    For an example of the application conversion, compare the examples in the MQI Programming Guide in Appendix C, "MQSeries® Everyplace® Nodes", with the converted equivalents in the section Writing MQe pub/sub applications.
    Note: There is a simpler way of modifying the application so that it generates only MQePubSubMsgObject class messages – but it has the disadvantage of perpetuating the use of the deprecated MQeMbMsgObject class in the application. Leave the logic unchanged until the point at which the message is about to be sent. Then use the new method MQeMbMsgObject.toMQePubSubMsgObject which generates the equivalent message object in the preferred class. This object must of course, be sent to the appropriate target queue according to its pub/sub function.

    Likewise for messages being received – an MQePubSubMsgObject class object can be converted to its equivalent MQeMbMsgObject object with the constructor MQeMbMsgObject(MQePubSubMsgObject).

  3. Configure an MQe bridge to transfer and transform MQe messages from the MQe network to the MQ network underlying the broker topology. The bridge transformer class must be configured to be com.ibm.mqe.mqbridge.MQeJMSRFHTransformer. Note that two bridge queues must also be configured: one to direct messages to the broker’s control queue SYSTEM.BROKER.CONTROL.QUEUE; the other to direct messages to the input queue of the appropriate message flow.

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.