Why after qpid broker is restarted messages which had been received in a
previous session get received again?
1) I launch a broker, my server and a client.
2) Server sends messages to clients.
3) I disconnect broker by Ctrl+c
4) My client and server wait until I restart the broker again.
5) The messages that the server had sent in 2) are received by clients
again.
After a connection gets broken, I re-open the session and create new senders
and receivers with the same addresses.
I am using C++ qpid version 0.6, messaging api.
Server code:
_broadcaster = _session.createSender(Address("acctUpdates/account_updates;
{create:always, node-properties;{type:topic, durable:True},
link-properties:{reliability:exactly-once}}"));
...
_bradcaster.send(msg);
Client code:
_recevier = _session.createReceiverr(Address("acctUpdates/account_updates;
{create:always, node-properties;{type:topic, durable:True},
link-properties:{reliability:exactly-once}}"));
_receiver.fetch(msg, qpid::sys::TIME_SEC);
_session.acknowledge();
_session.sync(); // does not make a difference if it is used or not
Message.setDurability() or .setTTL() are not even in the header files, although
the http://qpid.apache.org/apis/0.6/cpp/html/a00119.html says they exist.
"link-properties:{reliability:exactly-once}}" also has no effect.
Qpid-config shows exchange as durable and this is what I want. The queue
automatically created on this exchange is not durable and disappears after
ctrl+c.
Thank you.
Luba
________________________________
CONFIDENTIALITY WARNING: This email including any attachments may contain
privileged or confidential information and is for the sole use of the intended
recipient(s). Any unauthorized use or disclosure of this communication is
prohibited. This e-mail may also be subject to specific non-disclosure and
confidentiality provisions. The information contained herein is the property of
Chopper Trading, LLC. If you believe that you have received this email in
error, please notify the sender immediately and delete it from your system.