Skip to content

Commit 75bf2a9

Browse files
committed
Add filtering information to the documentation of RabbitMQ Stream protocol document
1. Link to up-to-date version of code describing Osiris chunk. 2. Update `Deliver` command description with Bloom filter entries. 3. Add information about use of `Publish` command with filter value. The hint about use of version 1 or 2 is based on the Java client implementation.
1 parent a8d9b9c commit 75bf2a9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

deps/rabbitmq_stream/docs/PROTOCOL.adoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ Publish => Key Version PublisherId PublishedMessages
289289
Message => bytes
290290
```
291291

292+
1. Use version 1 if there is no filter value.
293+
2. Use version 2 if there is a filter value.
294+
292295
=== PublishConfirm
293296

294297
```
@@ -394,7 +397,9 @@ Deliver => Key Version SubscriptionId OsirisChunk
394397
ChunkCrc => int32
395398
DataLength => uint32
396399
TrailerLength => uint32
397-
Reserved => unit32 // unused 4 bytes
400+
BloomSize => uint8 // size of bloom filter data
401+
Reserved => unit24 // unused 3 bytes
402+
BloomFilterData => [uint8] // bloom filter data (no int32 for the size of this array, the size is defined by BloomSize
398403
Messages => [Message] // no int32 for the size for this array; the size is defined by NumEntries field above
399404
Message => EntryTypeAndSize
400405
Data => bytes
@@ -419,14 +424,16 @@ Deliver => Key Version SubscriptionId CommittedOffset OsirisChunk
419424
ChunkCrc => int32
420425
DataLength => uint32
421426
TrailerLength => uint32
422-
Reserved => unit32 // unused 4 bytes
427+
BloomSize => uint8 // size of bloom filter data
428+
Reserved => unit24 // unused 3 bytes
429+
BloomFilterData => [uint8] // bloom filter data (no int32 for the size of this array, the size is defined by BloomSize
423430
Messages => [Message] // no int32 for the size for this array; the size is defined by NumEntries field above
424431
Message => EntryTypeAndSize
425432
Data => bytes
426433
```
427434

428435

429-
NB: See the https://github.com/rabbitmq/osiris/blob/f32df7563a036b1687c0208a3cb5f9e8f5cee937/src/osiris_log.erl#L101[Osiris project]
436+
NB: See the https://github.com/rabbitmq/osiris/blob/12a430b11be2c2be3f26ce4f2d7268954c7ec02b/src/osiris_log.erl#L126-L195[Osiris project]
430437
for details on the structure of messages.
431438

432439
=== Credit

0 commit comments

Comments
 (0)