[rabbitmq-discuss] Persistence and Transactions

Matthias Radestock matthias at rabbitmq.com
Tue Jan 1 00:43:14 GMT 2013


On 31/12/12 23:02, CJ wrote:
> In the examples, Why is the channel.waitForConfirmsOrDie() only performed
> after a batch of publishes, and not after each time a basicPublish is
> performed

Efficiency. If you call waitForConfirms after every publish you are 
effectively making publication synchronous, with network latency and 
disk fsyncs clobbering performance.

> Also, I do not understand the difference between the following 2 persistence
> tyopes:
>
>      MessageProperties.PERSISTENT_TEXT_PLAIN
>      MessageProperties.PERSISTENT_BASIC

These are not persistence types per se but convenient combinations of 
AMQP basic properties settings. See 
http://www.rabbitmq.com/javadoc/com/rabbitmq/client/MessageProperties.html 
for their definitions. The API guide 
(http://www.rabbitmq.com/api-guide.html) shows how to build your own 
AMQP.BasicProperties if none of the supplied ones meet your needs.

Regards,

Matthias.


More information about the rabbitmq-discuss mailing list