On 18/09/2019 6:10 am, syampearson wrote:
I have used c example in qpid proton 0.7 to send message to cloud. There I
have used amqp address as a string
ex:
char * address = (char *)
"amqps://testPolicy:[email protected]/cloudgatetest";

and set address using

message = pn_message();
pn_message_set_address(message, address);

How can I do it with new library qpid-proton 0.29.0.?

If I understand correctly, you have used the messenger API previously where the full url could be set on the message and the library took care of all the details needed to establish a connection and link and transfer the message.

I believe that API has now been deprecated, and at present there is no simple utility that would do this for you. You will need to split up the url above, with 'newdemo.servicebus.windows.net' being the host, 5671 being the port (the default for amqp over ssl), and the user and password being 'testPolicy' and 'bafb77fsbdfjsdfert784tgbbvdbsdjk='. Then open a sender link to address cloudgatetest with which you can send your message.

Maybe try starting with https://github.com/apache/qpid-proton/blob/master/c/examples/send-ssl.c in which all these can be passed in as command line arguments.

(If it doesn't need to be c, the equivalent examples in other languages, e.g. c++, are simpler).

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to