qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deb Haldar <debohal...@yahoo.com.INVALID>
Subject Using two AMQP Links over the same socket
Date Tue, 09 Aug 2016 23:18:02 GMT
 Hi Folks,
I'm trying to use the C Proton messenger to establish and send data over two AMQP links. While
the first link gets established, I don't see the second link getting established.
My code looks like the following below:
bool SendMessage(const char* msgtext, size_t message_size, std::string tenantRoute)
 pn_message_t* message = pn_message();
 pn_message_set_address(message, tenantRoute.c_str());
 pn_data_t* body = pn_message_body(message); pn_data_put_binary(body, pn_bytes(message_size,
msgtext)); pn_message_set_content_type(message,"charset=utf-8");
 pn_message_set_subject(message, "AMQPTest");
 //set the timeout of the messenger 
 pn_messenger_set_timeout(messenger, AmqpMessengerTimeout); // wait for a max of two seconds
before exit pn_messenger_put(messenger, message); int result = pn_messenger_send(messenger,
-1); pn_status_t status = pn_messenger_status(messenger, tracker);
 if (status == PN_STATUS_ACCEPTED && !(result < 0))
  sendResult = true;
  sendResult = false;
 } pn_message_free(message);
 message = NULL; return sendResult;
Essentially I'm trying to pass a new AMQP link address via tenantroute every time I call this
function.Any ideas ?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message