Browse Prior Art Database

A method and algorithm to determine the completeness of a group for grouped messages in a Message Queuing System Disclosure Number: IPCOM000208047D
Publication Date: 2011-Jun-21

Publishing Venue

The Prior Art Database


This invention relates to processing of messages in a group and in particular relates to determining the completeness of a group for messages in a group in a Message Queuing System.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 30% of the total text.

Page 01 of 10

A method and algorithm to determine the completeness of a group for grouped messages in a Message Queuing System


Message queuing is a technique for information exchange among distributed applications. Applications put and get messages to and from the message queues. Message queues store messages until they are read by a consuming application. Some message queuing system supports Group messages. Group messages are used to

Ensure ordering (if this is not guaranteed under the circumstances in which the message is transmitted).

Allow applications to group together similar messages (for example, those that must all be

processed by the same server instance).

A message group can be visualized as follows.

Group 1

Group 2

 Msg 1 Group 1

 Msg 2 Group 1

 Msg 2 Group 1

Msg N1 Group 1

 Msg 1 Group 2

 Msg 2 Group 2

 Msg 2 Group 2

Msg N2 Group 2


This is the highest level in the hierarchy and is identified by a GroupId . It consists of one or more messages that contain the same GroupId . These messages can be stored anywhere on the queue. The term message is used here to denote one item on a queue, such as would be returned by a single GET call.

Logical message

Logical messages within a group are identified by the GroupId and MsgSeqNumber fields. The MsgSeqNumber starts at 1 for the first message within a group, and if a message is not in a group, the value of the field is 1.


Page 02 of 10

Logical and physical ordering

Messages on queues can occur (within each priority level) in physical or logical order. Physical order is the order in which messages arrive on a queue. Logical order is when all of the messages within a group are in their logical sequence, adjacent to each other, in the position determined by the physical position of the first item belonging to the group.


When messages occur in group, it is required to determine whether all the messages of given group are present in the queue when an application requests for all messages in the group when the group is complete. This can be determined by scanning the messages in the queue. In some cases the scan might need multiple iterations to determine the completeness of the group.

If a queue has thousand to ten thousand messages then scanning for messages for completeness is time consuming and will have performance implications. The search complexity also increases when the messages arrive out of order or when the group contains duplicate messages (i.e. more than one message with the same sequence number).

This invention provides a method and algorithm to determine the completeness of a group as and when each message is put rather than scanning the entire queue when it is assumed that all messages of the group have arrived on the queue.

The existing technique involves scanning the queue several times. The present system works well when messages arrive on the queue in sequential order (e.g. seq no. 1, seq no. 2, seq no.
3....seq no.


        ). The complexity increases if the...