Wait for a single RabbitMQ message with a timeout

后端 未结 5 1614
礼貌的吻别
礼貌的吻别 2020-12-15 12:53

I\'d like to send a message to a RabbitMQ server and then wait for a reply message (on a \"reply-to\" queue). Of course, I don\'t want to wait forever in case the applicatio

5条回答
  •  Happy的楠姐
    2020-12-15 13:20

    I just added timeout support for amqplib in carrot.

    This is a subclass of amqplib.client0_8.Connection:

    http://github.com/ask/carrot/blob/master/carrot/backends/pyamqplib.py#L19-97

    wait_multi is a version of channel.wait able to receive on an arbitrary number of channels.

    I guess this could be merged upstream at some point.

提交回复
热议问题