You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The broker start sending messages as soon as the `Consumer` instance is created.
684
681
685
-
686
682
Staring from the 1.3.0 version, the `Consumer#MessageHandler` API runs in a separated `Task` and it is possible to use `async`/`await` in the handler.
687
683
688
-
689
684
The following table sums up the main settings to create a `Consumer` with `ConsumerConfig`:
690
685
691
686
[%header,cols=3*]
@@ -750,23 +745,28 @@ See the <<specifying-an-offset,offset section>> to find out more about the diffe
750
745
751
746
[[crc-on-delivery]]
752
747
===== Check the CRC on Delivery
753
-
RabbitMQ Stream provides a CRC32 checksum on each message to ensure the chunk is not corrupted.
754
-
The client library can check the CRC32 on the message and throw an exception if the message is corrupted. By default the CRC32 is not checked, to enable it you need to set the `ICrc32` in the `ConsumerConfig`:
755
748
756
-
.Checking the CRC32 on the message
749
+
RabbitMQ Stream provides a CRC32 checksum on each chunk.
750
+
The client library can check the checksum before parse the chunk and throw an `CrcException` exception if the validation fails.
751
+
By default the CRC32 checksum is not enabled, to enable it you need to set the `ICrc32` interface in the `ConsumerConfig`:
** `RabbitMQ.Stream.Client.RawSuperStreamProducer` - Low-level super-stream producer class
998
997
** `RabbitMQ.Stream.Client.RawSuperStreamConsumer` - Low-level super-stream consumer class
999
998
1000
-
The Classes are used to interact with the stream server in a low level way. They are used to create streams, publish messages, consume messages, etc. They give you all the callbacks to manually handle events like:
999
+
The Classes are used to interact with the stream server in a low level way.
1000
+
They are used to create streams, publish messages, consume messages, etc.
1001
+
They give you all the callbacks to manually handle events like:
1001
1002
1002
1003
* `Disconnection`
1003
1004
* `Metadata update`
@@ -1007,10 +1008,13 @@ The Classes are used to interact with the stream server in a low level way. They
<3> Event in case of MetadataHandler update. This event is triggered by the server when a stream changes topology like deleted or added/removed mirrors
1013
-
<4> ConfirmHandler event. This event is triggered when a `PublishingId` message is confirmed by the server with or without an error.
1014
+
<3> Event in case of MetadataHandler update.
1015
+
This event is triggered by the server when a stream changes topology like deleted or added/removed mirrors
1016
+
<4> ConfirmHandler event.
1017
+
This event is triggered when a `PublishingId` message is confirmed by the server with or without an error.
1014
1018
1015
1019
Like the `RawProducer` class, the `Raw*` classes have the same events to handle the disconnection and metadata update.
1016
1020
@@ -1019,21 +1023,24 @@ It is up to the user to handle the disconnection and metadata update events.
1019
1023
[WARNING]
1020
1024
.Be careful when using the `Raw*` classes.
1021
1025
====
1022
-
They are low-level classes and you need to handle the disconnection and metadata update events. If you don't handle them, you will end up with a disconnected client and you will not be able to reconnect to the server.
1026
+
They are low-level classes and you need to handle the disconnection and metadata update events.
1027
+
If you don't handle them, you will end up with a disconnected client and you will not be able to reconnect to the server.
1023
1028
1024
-
"RawProducer:send" is not thread-safe. You need to synchronize access to it.
1025
-
"RawProducer" does not handle the timeout/error confirmation messages. You need to handle it yourself.
1029
+
"RawProducer:send" is not thread-safe.
1030
+
You need to synchronize access to it.
1031
+
"RawProducer" does not handle the timeout/error confirmation messages.
1032
+
You need to handle it yourself.
1026
1033
====
1027
1034
1028
1035
===== High-level classes
1029
1036
1030
-
** <<creating-a-producer, `Producer`>> - High-level producer class
1037
+
** <<creating-a-producer, `Producer`>> - High-level producer class
1031
1038
** <<creating-a-consumer, `Consumer`>> - High-level consumer class
1032
1039
1033
-
1034
1040
`Producer` and `Consumer` classes handle auto-reconnection, metadata updates, super-stream and some low-level client behaviour.
1035
1041
1036
-
The `Producer` traces the sent and received messages to give back to the user the original message sent to the server and also handle the message timeout. See <<confirmation-status>> for more details.
1042
+
The `Producer` traces the sent and received messages to give back to the user the original message sent to the server and also handle the message timeout.
1043
+
See <<confirmation-status>> for more details.
1037
1044
1038
1045
It would be best to use `Producer` and `Consumer` classes unless you need to handle the low-level details.
0 commit comments