The present invention extends to methods, systems, and computer program
products for using subqueues to enhance local message processing.
Messages include queue IDs comprised of a parent portion and a suffix
portion. The parent portion identifies a parent queue and the suffix
portion identifies a subqueue of the parent queue. Message are logically
moved between queues by changing suffix values, such as, for example,
between subqueues, between the parent queue and a subqueue, and between a
subqueue and the parent queue. Applications can examine messages and
route messages to specified subqueues based on message content (including
message bodies and headers). Suffix values can be changed in place (e.g.,
while the message remains physically stored in the queue) so as to
preserve message sender identity and to avoid prematurely acknowledging
delivery (i.e., no return ACK is generated).