Each message flow that you design must provide a complete set of processing for messages received from a certain source. However, this might result in very complex message flows that include large numbers of nodes and cause a performance overhead and potential bottlenecks. Increasing the number of message flows that process your messages provides the opportunity for parallel processing and therefore improved throughput.
You can also consider the way in which the actions taken by the message flow are committed, and the order in which messages are processed.
Consider the following options for optimizing message flow throughput:
You can update the Additional Instances property of the deployed message flow in the bar file: the broker starts additional copies of the message flow on separate threads, providing parallel processing. This is the most efficient way of handling this situation, if you are not concerned about the order in which messages are processed.
If the message flow receives messages from a WebSphere MQ queue, you can influence the order in which messages are processed to some extent by setting the Order Mode property of the MQInput node:
For publish/subscribe applications that communicate with the broker over any supported protocol, messages for any given topic are published by brokers in the same order as they are received from publishers (subject to reordering based on message priority, if applicable). This normally means that each subscriber receives messages from a particular broker, on a particular topic, from a particular publisher, in the order that they are published by that publisher.
However, it is possible for messages, occasionally, to be delivered out of order. This can happen, for example, if a link in the network fails and subsequent messages are routed by another link.
If you need to ensure the order in which messages are received, you can use either the SeqNum (sequence number) or PubTime (publish time stamp) parameter on the Publish command for each published message, to calculate the order of publishing.
For more information about the techniques recommended for all MQI and AMI users, see the WebSphere MQ Application Programming Guide for programs written to the MQI, and WebSphere MQ Application Messaging Interface (available as SupportPac MA0F from the WebSphere MQ SupportPacs Web page) for programs written to the AMI.
WebSphere MQ Everyplace and SCADA applications use a different method of message ordering as described in WebSphere MQ Mobile Transport and WebSphere MQ Telemetry Transport respectively. The broker does not provide message ordering for messages received across WebSphere MQ Real-time Transport or WebSphere MQ Multicast Transport.
This option also removes the ability to determine the order in which the messages are processed. This is because, if there is more than one copy of the message flow active in the broker, each copy can be processing a message at the same time, from the same queue. The time taken to process a message might vary, and multiple message flows accessing the same queue could therefore read messages from the input source in a random order. The order of messages produced by the message flows might not correspond to the order of the original messages.
Ensure that the applications that receive message from these message flows can tolerate out-of-order messages.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac00350_ |