activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [1/2] activemq-cpp git commit: populate the rollback cause message in the error value returned in the poison ACK.
Date Wed, 29 Jul 2015 21:03:56 GMT
Repository: activemq-cpp
Updated Branches:
  refs/heads/master 67c2f93c9 -> e858be510


populate the rollback cause message in the error value returned in the
poison ACK.

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/45ade704
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/45ade704
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/45ade704

Branch: refs/heads/master
Commit: 45ade70482e5eb18567d6b00944720b943de3664
Parents: 67c2f93
Author: Timothy Bish <tabish121@gmail.com>
Authored: Wed Jul 29 16:56:07 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Wed Jul 29 16:56:07 2015 -0400

----------------------------------------------------------------------
 .../src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/45ade704/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp b/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
index f5f957a..57b7110 100644
--- a/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
+++ b/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
@@ -1516,10 +1516,9 @@ void ActiveMQConsumerKernel::rollback() {
                 Pointer<MessageAck> ack(new MessageAck(lastMsg, ActiveMQConstants::ACK_TYPE_POISON,
                                         this->internal->deliveredMessages.size()));
                 ack->setFirstMessageId(firstMsgId);
-                // TODO - Add cause to the message.
-                std::string message = "Exceeded RedeliveryPolicy max redelivery limit:" +
-                                       Integer::toString(internal->redeliveryPolicy->getMaximumRedeliveries());
-                                       //", cause:" + lastMd.getRollbackCause(), lastMd.getRollbackCause()));
+                std::string message = "Exceeded RedeliveryPolicy max redelivery limit: "
+
+                                       Integer::toString(internal->redeliveryPolicy->getMaximumRedeliveries())
+
+                                       " cause: " + lastMsg->getRollbackCause().getMessage();
                 ack->setPoisonCause(internal->createBrokerError(message));
                 session->sendAck(ack, true);
                 // Adjust the window size.


Mime
View raw message