async C client

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

async C client

Dave Clark

I am trying to implement a C client to RabbitMQ and would like to receive messages asynchronously but I do not see any callback mechanism in the C interface.  Is there one or do I have to implement my own?


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: async C client

alan.antonuk
Dave;

Assuming you're talking about the rabbitmq-c client library, currently the API does not have a callback API for dealing with asynchronous events. (This is something that sorely needs to be added to rabbitmq-c, but requires a bit of rearchitecting with the way rabbitmq-c works) 

Depending on what exactly you're trying to do, I would recommend putting the amqp_connection_state_t object in its own thread, and then firing off events to other threads when you receive messages.

-Alan


On Fri, Apr 4, 2014 at 10:03 AM, Dave Clark <[hidden email]> wrote:

I am trying to implement a C client to RabbitMQ and would like to receive messages asynchronously but I do not see any callback mechanism in the C interface.  Is there one or do I have to implement my own?


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss