In order to simplify message acknowledgment and address issue 46 [1], I
propose the following changes for STOMP 1.2:
* MESSAGE frames must contain an 'ack' header with an arbitrary value
* ACK/NACK frames must contain a matching 'id' header
Here are relevant spec snippets:
* MESSAGE frame:
| If the message is received from a subscription that requires explicit
| acknowledgment (either `client` or `client-individual` mode) then the
| `MESSAGE` frame MUST also contain an `ack` header with an arbitrary
| value. This header will be used to relate the message to a subsequent
| `ACK` or `NACK` frame.
* ACK frame:
| The `ACK` frame MUST include an `id` header matching the `ack` header
| of the `MESSAGE` being acknowledged. Optionally, a `transaction`
| header MAY be specified, indicating that the message acknowledgment
| SHOULD be part of the named transaction.
The change in functionality is minimal but it has several advantages:
- stop using the message-id for acknowledgment
- simpler MESSAGE/ACK matching using only one header
- similarity with the receipt mechanism
Comments?
Cheers,
Lionel
[1]
https://github.com/stomp/stomp-spec/issues/46