Search code examples
c++amqpqpid

Proton QPID with standard input


I'm just about to dig into AMQP protocol and things. I'm using proton with C++ bindings.

I've stuck with a little problem here.

Say, I have an asynchrnous receiver like in it's example, which one may find in simple_recv.cpp. So, the problem I see here is that proton has its own mainloop not connected with application's one which may be very usefull if the receiving application is about to process some stdin data. Hence is my question: is it possible (and how) to process data from stdin and still employ asynchronous proton-qpid API.


Solution

  • The only solution I see without creating my own reactor or smth like in here is to use multithreaded application and support thread-safety as much as possible.