[rabbitmq-discuss] How to receive STOMP receipt only after the consumer has acknowledged the message?

joshua__lim joshua__lim at hotmail.com
Fri Aug 16 07:26:37 BST 2013


Hi Emile, thank you for your reply to my query.

> If you want an end-to-end proof of delivery from the consumer then you
> must set up an independent line of communication between the consumer
> and the producer and send a proof-of-delivery token back along that route.
<
> Depending on your needs you may wish to make consumer acknowledgements
> synchronous by acknowledging in a transaction before sending the
> proof-of-delivery.

Here's how I think I may implement the end to end delivery reporting.

For my case, I'll be running multiple threads and producers, connecting to a
RabbitMQ cluster of 2 servers.  Each producer will subscribe to a distinct
"ack" queue to receive acknowledgements for messages they sent.  The
consumer will need to know which "ack" queue to send the acknowledgement.

By "transaction", would you be referring to STOMP transaction?  I was just
testing ACK with the transaction header the last couple of hours but did not
manage to get it to work - ACK is processed without having to issue COMMIT. 
In the following test, I subscribed to the topic "keepalive", created a
transaction with id "gwtx8" and receive a message with payload "I'm alive!". 

 SUBSCRIBE
destination:/topic/presence
ack:client-individual
id:alertgateway1
persistent:true
receipt:005

^@
RECEIPT
receipt-id:005

BEGIN
transaction:gwtx8

^@
MESSAGE
subscription:alertgateway1
destination:/topic/presence
message-id:T_alertgateway1@@session-sAtZSzKtm_X58pl46L0_uw@@3
receipt:003
persistent:true
content-length:19

I'm alive!

 ACK
subscription:alertgateway1
message-id:T_alertgateway1@@session-sAtZSzKtm_X58pl46L0_uw@@3
transaction:gwtx8
receipt:001

^@
RECEIPT
receipt-id:001
--> ACK is processed without COMMIT




--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/How-to-receive-STOMP-receipt-only-after-the-consumer-has-acknowledged-the-message-tp28808p28856.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list