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.
782
782
783
783
[WARNING]
784
-
.Keep the message processing callback as short as possible
784
+
.The message processing callback can take its time, but not too much
785
785
====
786
-
The message processing callback should be kept as short as possible
787
-
to avoid blocking the connection thread. Not doing so can
788
-
make the `Environment`, `Producer`, `Consumer` instances sluggish
789
-
or even block them. Any long processing should be done in
790
-
a separate thread (e.g. with an asynchronous `ExecutorService`).
786
+
The message processing callback should not take too long or it could impact other consumers sharing the same connection.
787
+
The <<configuring-the-environment,`EnvironmentBuilder#maxConsumersByConnection(int)>>` method allows isolating consumers from each other, at the cost of creating and maintaining more connections.
788
+
Consider using a separate thread for long processing (e.g. with an asynchronous `ExecutorService`).
789
+
Note message processing callbacks run in a dedicated thread, they do not impact other network frames, which run in their own thread.
791
790
====
792
791
793
792
The following table sums up the main settings to create a `Consumer`:
0 commit comments