Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Exchange Level Message sequencing
  • Initial Value Exchange

Exchange Level Message sequencing

...

Code Block
    unit64_t seqNo;
    //after message transfer
    seqNo = message.getHeaders().getAsInt64("qpid.msg_sequence");

Initial Value Exchange

This feature caches a last message sent to an exchange. When a new binding is created onto the exchange it will then attempt to route this cached messaged to the queue, based on the binding. This allows for topics or the creation of configurations where a new consumer can receive the last message sent to the broker, with matching routing.

To use this feature an exchange needs to be declared specifying this option in the declare

Code Block

....
    FieldTable args;
    args.setInt("qpid.ive",1);

...
    // now declare the exchange
    session.exchangeDeclare(arg::exchange="direct", arg::arguments=args);

now use the exchange in the same way you would use any other exchange.