Closed lishali12345 closed 11 years ago
The ACK frame is correct. The spec contains:
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.
You mean the id header in the ACK frame should be as same as the message it acknowledged, so the id header will be "message-id" actually?
And I found the id header of ACK frame in the spec in version 1.1 is "message-id", I don't know why it's changed in version 1.2.Does it mean the STOMP server can use any id header, and the id header of client ACK frame just need to match the id header of the message which will be acknowledged?
In STOMP 1.2, the "id" header of the ACK frame must be identical to the "ack" header of the matching MESSAGE frame. This has nothing to do with the "message-id" header and yes, the STOMP server can use any value for the MESSAGE "ack" header. For more information on why it changed, see https://github.com/stomp/stomp-spec/issues/46. In short: "message-id" may be used for other purposes and should not be used by STOMP, the MESSAGE "ack" header is used by the server to verify the delivery of a given MESSAGE frame.
STOMP 1.1 is indeed different.
I got it, Thanks a lot.
The original document miss the subscription header, and the id header in ACK frame should be message-id