[rabbitmq-discuss] How to consumer both synchronous and asynchronous messages
Matthias Radestock
matthias at rabbitmq.com
Tue Nov 6 15:15:28 GMT 2012
Mahesh,
On 05/11/12 18:00, Mahesh Viraktamath wrote:
> I meant to say that our consumer should double up as both synchronous
> and asynchronous consumer. Some messages follow the RPC routine and some
> as working queue and need immediate confirmation after processing.
Whether acks are required is a property of consuming, rather than
individual messages.
You could simply always consume in ack mode; the overhead isn't *that*
great particularly when ack'ing straight away.
Alternatively, partition the messages s.t. they end up in two distinct
queues and then set up two consumers, one in ack-mode and one in no-ack
mode. This can all be done on a single channel. The main downside here
is that you will lose ordering between the two classes of messages.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list