activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r519300 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Date Sat, 17 Mar 2007 12:12:34 GMT
Author: nmittler
Date: Sat Mar 17 05:12:33 2007
New Revision: 519300

URL: http://svn.apache.org/viewvc?view=rev&rev=519300
Log:
AMQCPP-80 - always add message id, regardless of the disable flag

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&rev=519300&r1=519299&r2=519300
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
Sat Mar 17 05:12:33 2007
@@ -875,17 +875,16 @@
                 "Message is not a valid Open Wire type.");
         }
 
-        if( !producer->isDisableMessageId() )
-        {
-            commands::MessageId* id = new commands::MessageId();
-            id->setProducerId(
-                dynamic_cast<commands::ProducerId*>(
-                    producer->getProducerInfo()->getProducerId()->cloneDataStructure()
) );
+        // Always assign the message ID, regardless of the disable
+        // flag.  Not adding a message ID will cause an NPE at the broker.
+        commands::MessageId* id = new commands::MessageId();
+        id->setProducerId(
+            dynamic_cast<commands::ProducerId*>(
+                producer->getProducerInfo()->getProducerId()->cloneDataStructure()
) );
 
-            id->setProducerSequenceId( getNextProducerSequenceId() );
+        id->setProducerSequenceId( getNextProducerSequenceId() );
 
-            amqMessage->setMessageId( id );
-        }
+        amqMessage->setMessageId( id );
 
         amqMessage->setProducerId(
             dynamic_cast<commands::ProducerId*>(



Mime
View raw message