You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/03/29 16:43:30 UTC
svn commit: r759701 - in
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core:
ActiveMQConsumer.cpp ActiveMQSession.cpp
Author: tabish
Date: Sun Mar 29 14:43:29 2009
New Revision: 759701
URL: http://svn.apache.org/viewvc?rev=759701&view=rev
Log:
Fix late registration of Consumer to the session executer, messages were being lost because no dispatcher was in the map when some arrived.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=759701&r1=759700&r2=759701&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp Sun Mar 29 14:43:29 2009
@@ -60,9 +60,6 @@
this->consumerInfo = consumerInfo;
this->listener = NULL;
this->closed = false;
-
- // Send our info to the Broker.
- this->session->syncRequest( this->consumerInfo );
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp?rev=759701&r1=759700&r2=759701&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp Sun Mar 29 14:43:29 2009
@@ -273,6 +273,9 @@
this->consumers.put( consumer->getConsumerInfo().getConsumerId(), consumer.get() );
}
+ // Send our info to the Broker.
+ this->syncRequest( consumerInfo );
+
return consumer.release();
}
AMQ_CATCH_RETHROW( ActiveMQException )
@@ -315,6 +318,9 @@
this->consumers.put( consumer->getConsumerInfo().getConsumerId(), consumer.get() );
}
+ // Send our info to the Broker.
+ this->syncRequest( consumerInfo );
+
return consumer.release();
}
AMQ_CATCH_RETHROW( ActiveMQException )