On Wed, 2016-08-10 at 15:53 +0000, Deb Haldar wrote: > Guys, any thoughts on the question below?
I suspect the delay in replying is that no one here is 100% sure whether you can change the message address and expect messenger to automatically re-establich a new link, without checking the source code. That is compounded by the most of the current development work going into reactive style APIs. I can tell you are using C++ around this code - is it possible for you to code this using the reactive C++ API from 0.13 or the beta 0.14? It would require a little different framework code, but that is an API that we are currently working on actively. Andrew > Thanks,Deb. > > Sent from Yahoo Mail on Android > > On Tue, Aug 9, 2016 at 4:18 PM, Deb Haldar<[email protected] > ALID> wrote: 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_clear(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; > } > else > { > 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 ? > Thanks, > Deb. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
