Author: aconway
Date: Wed Dec  1 21:32:52 2010
New Revision: 1041180

URL: http://svn.apache.org/viewvc?rev=1041180&view=rev
Log:
Add missing call to Message::setTimestamp in ManagementAgent::sendBufferLH.

Without this, messages generated here will not be expired consistently
in a cluster which may cause a broker to become inconsistent and exit
with an invalid-argument error.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp?rev=1041180&r1=1041179&r2=1041180&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp Wed Dec  1 
21:32:52 2010
@@ -596,9 +596,10 @@ void ManagementAgent::sendBufferLH(const
     DeliveryProperties* dp =
         msg->getFrames().getHeaders()->get<DeliveryProperties>(true);
     dp->setRoutingKey(routingKey);
-    if (ttl_msec)
+    if (ttl_msec) {
         dp->setTtl(ttl_msec);
-
+        msg->setTimestamp(broker->getExpiryPolicy());
+    }
     msg->getFrames().append(content);
 
     {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to