Consultor Eletrônico



Kbase 20795: SonicMQ: PERSISTENT, NON_PERSISTENT delivery mode.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/8/2001
SUMMARY:

This Knowledgebase applies to SonicMQ Version 2000.1 and Version 3.0
It explains PERSISTENT and NON_PERSISTENT delivery mode.

EXPLANATION:

By setting the message delivery mode to PERSISTENT, the message is
logged before the producer is acknowledged and is guaranteed to be
retained in the final message server?s message store until it is
either acknowledged as delivered or it expires. The value of
PERSISTENT tells the broker to save the message.

What Are The Benefits of Choosing PERSISTENT Delivery Mode?
* To prevent the loss of messages due to system failure.
* Reliability is more important than performance.

The PERSISTENT delivery mode applies to both messaging domains,
Point-to-Point and Publish and Subscribe. This is an example of
setting delivery mode to PERSISTENT in the Point-to-Point domain.

sender.send( msg,
javax.jms.DeliveryMode.PERSISTENT,
javax.jms.Message.DEFAULT_PRIORITY,
MESSAGE_LIFESPAN);

By setting the message delivery mode to NON_PERSISTENT, the
messages are volatile in the event of server failure and will be lost
on server re-start. NON_PERSISTENT messages should only be used
when a loss of messages due to server failure is not an issue for your
messaging system.

What Are The Benefits of Choosing NON_PERSISTENT Delivery Mode?
- Lower overhead
- Performance is more important than reliability.

The NON_PERSISTENT delivery mode applies to both messaging domains,
Point-to-Point and Publish and Subscribe. This is an example of
setting delivery mode to NON_PERSISTENT in the Publish and Subscribe
domain.

publisher.publish( msg,
javax.jms.DeliveryMode.NON_PERSISTENT,
javax.jms.Message.DEFAULT_PRIORITY,
MESSAGE_LIFESPAN);

Reference to Written Documentation:

For technical articles and whitepapers, visit.
http://www.sonicsoftware.com/products/documentation/

SonicMQ Programming Guide.