Add correlation ID field in commit offset frame

Not used yet, but can avoid a command version change if the command
should have confirm response.
This commit is contained in:
Arnaud Cogoluègnes 2020-10-02 14:16:22 +02:00
parent b8bdb5ae7b
commit 5e80aa9f39
2 changed files with 3 additions and 1 deletions

View File

@ -406,6 +406,7 @@ SaslAuthenticateResponse => Key Version CorrelationId ResponseCode PeerPropertie
CommitOffset => Key Version Reference Stream Offset
Key => int16 // 16
Version => int16
CorrelationId => int32 // not used yet
Reference => string // max 256 characters
SubscriptionId => uint8
Offset => int64

View File

@ -712,7 +712,8 @@ handle_frame_post_auth(Transport, #stream_connection{socket = S} = Connection,
end;
handle_frame_post_auth(_Transport, #stream_connection{virtual_host = VirtualHost, user = User} = Connection,
State,
<<?COMMAND_COMMIT_OFFSET:16, ?VERSION_0:16, ReferenceSize:16, Reference:ReferenceSize/binary,
<<?COMMAND_COMMIT_OFFSET:16, ?VERSION_0:16, _CorrelationId:32,
ReferenceSize:16, Reference:ReferenceSize/binary,
StreamSize:16, Stream:StreamSize/binary, Offset:64>>, Rest) ->
case check_write_permitted(#resource{name = Stream, kind = queue, virtual_host = VirtualHost}, User, #{}) of