[rabbitmq-discuss] Reject persistent messages on a specific queue
Matthias Radestock
matthias at rabbitmq.com
Sun Mar 9 08:58:14 GMT 2014
Giovanni,
On 07/03/14 16:32, Giovanni Foiani wrote:
> I'd like to know if is possible to force a queue to accept only non
> persistent messages and reject persistent ones.
> I'm asking this because I read that persistent messages reduce RabbitMQ
> performace and I want to prevent clients to persist messages on specific
> queues.
Please read
https://www.rabbitmq.com/tutorials/amqp-concepts.html#queue-durability,
which explains that messages are only persisted if they are marked as
such *and the queue is declared as 'durable'*. So simply declare the
queue(s) as non-durable, though this does mean they need re-creating
after a broker restart.
Matthias.
More information about the rabbitmq-discuss
mailing list