diff options
author | Gordon Sim <gsim@apache.org> | 2011-02-10 10:12:41 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2011-02-10 10:12:41 +0000 |
commit | 731d6c4b13ed7ae5941a4b0f969be357f3d7e831 (patch) | |
tree | 5fc47c2ce19bbc0872356ef9c5f5ef073752f2cb /cpp/src/tests/qpid-send.cpp | |
parent | 8ead4c97b75e508a877e8d446a5bef096e606d84 (diff) | |
download | qpid-python-731d6c4b13ed7ae5941a4b0f969be357f3d7e831.tar.gz |
QPID-529: Priority queue implementation
QPID-2104: LVQ enhancement
These both required some refactoring of the Queue class to allow cleaner implementation of different types of behaviour. The in-memory storage of messages is now abstracted out behind an interface specified by qpid::broker::Messages which qpid::broker::Queue uses. Different implementations of that are available for the standard FIFO queue, priority queues and LVQ (I have also separated out the 'legacy' implementation of LVQ from the new version driven by QPID-2104).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1069322 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/qpid-send.cpp')
-rw-r--r-- | cpp/src/tests/qpid-send.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/tests/qpid-send.cpp b/cpp/src/tests/qpid-send.cpp index c71cb83f9a..3824a870bf 100644 --- a/cpp/src/tests/qpid-send.cpp +++ b/cpp/src/tests/qpid-send.cpp @@ -56,6 +56,7 @@ struct Options : public qpid::Options uint sendEos; bool durable; uint ttl; + uint priority; std::string userid; std::string correlationid; string_vector properties; @@ -84,6 +85,7 @@ struct Options : public qpid::Options sendEos(0), durable(false), ttl(0), + priority(0), contentString(), contentSize(0), contentStdin(false), @@ -110,6 +112,7 @@ struct Options : public qpid::Options ("send-eos", qpid::optValue(sendEos, "N"), "Send N EOS messages to mark end of input") ("durable", qpid::optValue(durable, "yes|no"), "Mark messages as durable.") ("ttl", qpid::optValue(ttl, "msecs"), "Time-to-live for messages, in milliseconds") + ("priority", qpid::optValue(priority, "PRIORITY"), "Priority for messages (higher value implies higher priority)") ("property,P", qpid::optValue(properties, "NAME=VALUE"), "specify message property") ("correlation-id", qpid::optValue(correlationid, "ID"), "correlation-id for message") ("user-id", qpid::optValue(userid, "USERID"), "userid for message") @@ -266,6 +269,9 @@ int main(int argc, char ** argv) if (opts.ttl) { msg.setTtl(Duration(opts.ttl)); } + if (opts.priority) { + msg.setPriority(opts.priority); + } if (!opts.replyto.empty()) msg.setReplyTo(Address(opts.replyto)); if (!opts.userid.empty()) msg.setUserId(opts.userid); if (!opts.correlationid.empty()) msg.setCorrelationId(opts.correlationid); |