Quantcast

How do you get the delivery_tag before publishing in C?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How do you get the delivery_tag before publishing in C?

davidkim
This post has NOT been accepted by the mailing list yet.
I am working on creating confirm for publishing in C. After publishing, I am able to receive ACKs and check for the delivery_tag (and I see it increment by 1 upon each publish). But I don't have anything to compare this value with. Who sets the delivery_tag, the client (publisher) or server (broker), and if it is the client, how can we obtain this value? If server, does client need to do some bookkeeping to maintain message ids? I am looking for something like Java's getNextPublishSeqNo() equivalent but in C.

To make clear, this is what I want to do:
int seqNo = getNextPublishSeqNo();
amqp_basic_publish();
amqp_basic_wait_frame(conn, &frame);
if (frame's delivery_tag == seqNo) {
    "I received confirmation for the right message!"
}
Loading...