Add ability to move messages from one queue to another
------------------------------------------------------
Key: QPID-1290
URL: https://issues.apache.org/jira/browse/QPID-1290
Project: Qpid
Issue Type: New Feature
Components: C++ Broker
Reporter: William Henry
Fix For: M4
Attachments: move_messages_diff.txt
There are some administrative use cases where it is necessary to move messages
off of one queue and place on another. Perhaps the initial queue has some bad
messages that need to be examined, perhaps the initial queue is getting
inundated.
The changes have been made to the Broker and Queue class.
With Broker you can call queueMoveMessages and pass the name of the source
queue and the destination queue along with the quantity of messages to be
moved. A 0 (zero) for the message quantity means move all messages.
The Broker::queueMoveMessages looks up the queue pointers and calls move on the
source Queue, passing the destination queue pointer and the quantity. (The
Queue class has move efficient private methods for handling removing the
messages.)
Move will return the number of messages actually used. Unfortunately
queueMoveMessages returns a status and this quantity actually moved is lost.
This enhancement allows an administrator to move messages form one queue to
another using qpid-tool using:
call <broker-ID> queueMoveMessages <src-queue> <dest-queue> <qty>
This works fine.
Questions:
1) Is the schema name queueMoveMessages too long?
2) Perhaps it would be nice to return the quantity instead of just STATUS_OK
but that might mess up the framework. Mayeb have an extra out parameter that
has the actually quantity moved?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.