Hi Francesco,

I achieved similar behavior but using Qpid Proton-C (AMQP send-only
program).

After initialiazing proton and getting the first FLOW event, I simply
"yield" main event loop control to an external/looping function that can
read from a different source and then send the same message to an AMQP
destination.

It may seem hard in the beggining but once you get a hold on how to
integrate proton events loop into your program loop, it has good chances to
work.

Adrian


On Wed, Jul 15, 2020, 11:22 AM Francesco Raviglione <
francescorav.es...@gmail.com> wrote:

> Dear all,
> I'm trying to use the Python version of Qpid Proton to send data to an AMQP
> 1.0 broker.
> I've seen that several examples are sending data which was
> available/defined before the AMQP event loop is started.
> However, I need to send data only when it becomes available from an
> external process (for example by waiting for it on a Pipe, with
> self.amqp_pipe_end.recv()), and then send it immediately to the broker.
> If I try to wait on a pipe inside "on_sendable", no message is actually
> transferred to the broker, as the event loop is "blocked" waiting for new
> data and cannot manage properly the AMQP 1.0 connection (is this correct?).
> How could I achieve the desired result? How can I make the loop wait for
> external data and then immediately send it?
>
> Thank you very much in advance,
> Francesco Raviglione
>

Reply via email to