William Henry wrote:
Hi all,

There is a requirement to be able to administratively move messages from one queue to another and I'm looking for input regarding the/a use case for this requirement.

It has been suggested that this is really a query/criteria based move and it's really at a broker level. i.e. broker X please move all messages from user johnz from queue A to queue B. Or broker X please move all messages with topic Y from queue A to queue B. Queue B might just be some sort of suspend queue while an administrator finds out what johnz really wants or why messages of topic Y are not getting consumed etc.

Has anyone any opinions or a concrete use case for this?
Regards,
William  Henry

My two cents...

I think this is an administrative function that is performed on-demand and has no lasting affect on the normal operation of the broker (i.e. no filters or redirects are used). I also think that this feature will be used primarily as a diagnostic tool.

Since messages are not modeled as management objects, this feature must be coupled with a message-query feature. A management method (or set of methods) can be implemented on queue objects to allow management users to get information about the set of messages on a queue. For example:

- Get the top 10 most frequently seen reply-to fields and their instance counts.
 - Get the largest 10 message body sizes
 - Get the top 10 most frequently seen [header-field] and instance counts.
- Get the number of messages with [header-field] matching a specified value. - Fill in a histogram of message sizes. The histogram buckets can be supplied by the request or be fixed.

This query feature can be used to provide visibility into the content of a blocked or slow-moving queue.

A companion feature can then be implemented that moves or copies all messages meeting a certain criteria (i.e. size range or header field match) to another queue. This allows the administrator to go to the next level and actually view the full contents of messages (by subscribing a consumer to the copied-to queue). It also allows the administrator to remove messages from the queue to solve an application problem.

Note that message query and message move/copy will probably require that the queue be locked during the duration of the operation so these may be expensive features. It would be good to find a way to implement these on a flowing queue without locking.

-Ted

Reply via email to