From 3a60db0672b78a75c52f39f5cefeeb00d3eeba97 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 9 Feb 2009 22:25:26 +0000 Subject: Cluster support for message time-to-live. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@742774 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SemanticState.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'cpp/src/qpid/broker/SemanticState.cpp') diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index f9f75679e5..13a8c649d2 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/cpp/src/qpid/broker/SemanticState.cpp @@ -358,14 +358,13 @@ void SemanticState::route(intrusive_ptr msg, Deliverable& strategy) { std::string exchangeName = msg->getExchangeName(); //TODO: the following should be hidden behind message (using MessageAdapter or similar) - // Do not replace the delivery-properties.exchange if it is is already set. - // This is used internally (by the cluster) to force the exchange name on a message. - // The client library ensures this is always empty for messages from normal clients. if (msg->isA()) { - if (!msg->hasProperties() || - msg->getProperties()->getExchange().empty()) + // Do not replace the delivery-properties.exchange if it is is already set. + // This is used internally (by the cluster) to force the exchange name on a message. + // The client library ensures this is always empty for messages from normal clients. + if (!msg->hasProperties() || msg->getProperties()->getExchange().empty()) msg->getProperties()->setExchange(exchangeName); - msg->setTimestamp(); + msg->setTimestamp(getSession().getBroker().getExpiryPolicy()); } if (!cacheExchange || cacheExchange->getName() != exchangeName){ cacheExchange = session.getBroker().getExchanges().get(exchangeName); -- cgit v1.2.1