Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed optimistic consume

...

A fully worked LVQ Example can be found here

Setting additional behaviors -

...

Optimistic Consume allows the consumer to dequeue the message before the broker has acknowledged the producer. This is useful to reduce latency when doing duarble messaging, but has the following additional consideration.

In a failure it is possible that the consumer will receive duplicate messages. These can come from two sources.

  • The producer might re-send a message the consumer receiver, because the broker had not acknowledged the producer yet
  • The broker might not have persisted the consumers dequeue, resulting in a duplicate resend.

Example:

Code Block

#include "qpid/client/QueueOptions.h"

    QueueOptions qo;
    qo.setOptimisticConsume();

    session.queueDeclare(arg::queue=queue, arg::arguments=qo);

Setting additional behaviors - Persist Last Node

This option is used in conjunction with clustering. It allows for a queue configured with this option to persist transient messages if the cluster fails down to the last node. If additional nodes in the cluster are restored it will stop persisting transient messages.

...