Dear all,
I am writing you because I'm trying to better understand how to use the
Qpid Proton C++ library, after learning a bit how to work with the C API.

My goal would be, in particular, to write a client/producer which can
connect to an external broker, from which other clients can then consume my
messages.

My issue is that I should integrate the client inside an application which
should continue running after I start the Qpid Proton event loop.
In particular, the application should perform other operations and prepare,
from time to time, the messages which should be dispatched to the broker.

Do you know whether there is a good way to achieve this goal directly
within Qpid Proton?

Looking at the "helloworld.cpp" example, the client is entering the event
loop by means of "proton::container(hw).run();", and exiting that loop only
when "d.connection().close();" is called.
Is there any way in which I can periodically "inject" some messages into
the event loop, letting the application run after the call to
"proton::container(hw).run();", and then going back to handling AMQP events
when I need to send a new packet, without the need of opening and closing
the connection every time (as the messages I need to prepare and send may
come quite at a fast rate, even less than every 100 ms)?
Should I rely on multiple threads?

Thank you very much in advance for your assistance.

Reply via email to