I know that i can specify the durable setting for each queue and persistent for every message manually. but i'm looking for a way to change the default behavior so everything (queues, messages, etc) will be persistent and durable.
Setting this in a central place in the code will be better than configuration file but please share all the ways to do so instead of "generic function" because i have lots of places that using the amqpapi directly.
Any ideas?
We had the same requirements and we did not find any built-in way to make all messages persistent by default in RabbitMQ.
Our solution was to create a common library to send/receive messages. This library would set the delivery mode to persistent. We also use it to define common conventions for our queue/exchange names and policies.