On 22/01/14 02:02, Xiong Zou wrote:
You mentioned that /*"You need to make sure the publisher(s) mark(s) the
messages as persistent. Unfortunately at present the c++ broker doesn't
provide a way to override that on the broker side."*/

I'm a little bit rusty on this bit, but isn't the *default* behaviour in both the JMS and qpid::messaging client APIs that messages are marked as persistent by default?

From the JMS JavaDocs:

*Field Summary*
|static int| |*DEFAULT_DELIVERY_MODE <http://docs.oracle.com/javaee/5/api/javax/jms/Message.html#DEFAULT_DELIVERY_MODE>*|
          The message producer's default delivery mode is |PERSISTENT|.
|static int| |*DEFAULT_PRIORITY <http://docs.oracle.com/javaee/5/api/javax/jms/Message.html#DEFAULT_PRIORITY>*|
          The message producer's default priority is 4.
|static long| |*DEFAULT_TIME_TO_LIVE <http://docs.oracle.com/javaee/5/api/javax/jms/Message.html#DEFAULT_TIME_TO_LIVE>*| The message producer's default time to live is unlimited; the message never expires.



I'm pretty sure it's the same for qpid::messaging too.

So the comments from Gordon and Rob are true that you can't currently override what has been specified by the client in the broker, but unless your clients have *explicitly* set the delivery mode to DeliverMode.NON_PERSISTENT then they will be marked as durable - and I'd argue that if they've explicitly set it as NON_PERSISTENT then they are not in any sort of strong position to argue with you if you happen to lose their messages :-)

Cheers,
Frase






Reply via email to