Hello,
I have a simple C++ client which connects to a Qpid Java Broker (6.0.4) and
receives messages.
With the default behavior of the C++ client, how can I know when a delivery has
been settled?
It seems there is no way for me to know that.
I have debugged a bit and when the on_message is called, the message becomes in
"Acquired" state on the broker. Later on, somewhere which I haven't found yet,
the message is settled and disappears from the broker. However none of the
functions I implemented below is called.
Can you please assist?
Console output
-----------------------
on_message
Code
-----------------------
class MyHandler : public proton::messaging_handler
{
public:
virtual void on_container_start(proton::container &c)
{
proton::url url("localhost:5672");
proton::connection connection = c.connect(url);
proton::receiver_options
receiverOptions(proton::receiver_options().credit_window(0));
connection.open_receiver("queue.name", receiverOptions);
}
virtual void on_receiver_open(proton::receiver& l)
{
l.add_credit(1);
}
virtual void on_message(proton::delivery &d, proton::message &m)
{
std::cout << "on_message" << std::endl;
}
virtual void on_delivery_settle(proton::delivery &d)
{
std::cout << "on_delivery_settle" << std::endl;
}
virtual void on_tracker_accept(proton::tracker &d)
{
std::cout << "on_tracker_accept" << std::endl;
}
virtual void on_tracker_reject(proton::tracker &d)
{
std::cout << "on_tracker_reject" << std::endl;
}
virtual void on_tracker_release(proton::tracker &d)
{
std::cout << "on_tracker_release" << std::endl;
}
virtual void on_tracker_settle(proton::tracker &d)
{
std::cout << "on_tracker_settle" << std::endl;
}
};
Regards,
Adel