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 2010/12/28 15:23:59 UTC
svn commit: r1053354 - in
/activemq/activemq-cpp/trunk/activemq-c/src/main/c: CMS_MessageProducer.cpp
CMS_MessageProducer.h
Author: tabish
Date: Tue Dec 28 14:23:59 2010
New Revision: 1053354
URL: http://svn.apache.org/viewvc?rev=1053354&view=rev
Log:
Apply patch for: https://issues.apache.org/jira/browse/AMQCPP-336
Modified:
activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp
activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h
Modified: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp?rev=1053354&r1=1053353&r2=1053354&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.cpp Tue Dec 28 14:23:59 2010
@@ -74,6 +74,26 @@ cms_status producerSendWithDefaults(CMS_
}
////////////////////////////////////////////////////////////////////////////////
+cms_status producerSendWithTimeOut(CMS_MessageProducer* producer, CMS_Message* message, long long timeOut) {
+
+ cms_status result = CMS_SUCCESS;
+
+ try{
+
+ if (producer == NULL || message == NULL) {
+ result = CMS_ERROR;
+ } else {
+ producer->producer->send(message->message, producer->producer->getDeliveryMode(), producer->producer->getPriority(), timeOut);
+ }
+
+ } catch(...) {
+ result = CMS_ERROR;
+ }
+
+ return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
cms_status closeProducer(CMS_MessageProducer* producer) {
cms_status result = CMS_SUCCESS;
Modified: activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h?rev=1053354&r1=1053353&r2=1053354&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/CMS_MessageProducer.h Tue Dec 28 14:23:59 2010
@@ -51,6 +51,20 @@ cms_status createProducer(CMS_Session* s
cms_status producerSendWithDefaults(CMS_MessageProducer* producer, CMS_Message* message);
/**
+ * Given a Message Producer, send the given Message using that Producer.
+ *
+ * @param producer
+ * The Message Producer to use for this send operation.
+ * @param message
+ * The Message to send via the given Message Producer.
+ * @param timeOut
+ * The timeout for the message.
+ *
+ * @return result code indicating the success or failure of the operation.
+ */
+cms_status producerSendWithTimeOut(CMS_MessageProducer* producer, CMS_Message* message, long long timeOut);
+
+/**
* Sets the delivery mode used by the given producer.
*
* @param producer