diff options
author | Gordon Sim <gsim@apache.org> | 2016-06-28 21:32:06 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2016-06-28 21:32:06 +0000 |
commit | ebb276cca41582b73223b55eff9f2d4386f4f746 (patch) | |
tree | 8aebe92f60aa035aa04861c7aa42af60c0481ec2 /qpid/cpp/src/qpid/broker/Queue.cpp | |
parent | 13525713a1f57c4228982c79029f7a5486ced0e7 (diff) | |
download | qpid-python-ebb276cca41582b73223b55eff9f2d4386f4f746.tar.gz |
QPID-7329: Merge branch 'github/pr/10' into trunk
Closes #10
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1750587 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/broker/Queue.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/broker/Queue.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index 625c6cceba..858e8748c4 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -345,6 +345,19 @@ void Queue::process(Message& msg) } } +void Queue::mergeMessageAnnotations(const QueueCursor& position, + const qpid::types::Variant::Map& messageAnnotations) +{ + Mutex::ScopedLock locker(messageLock); + Message *message = messages->find(position); + if (!message) return; + + qpid::types::Variant::Map::const_iterator it; + for (it = messageAnnotations.begin(); it != messageAnnotations.end(); ++it) { + message->addAnnotation(it->first, it->second); + } +} + void Queue::release(const QueueCursor& position, bool markRedelivered) { QueueListeners::NotificationSet copy; |