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
{{ message }}
This repository was archived by the owner on Apr 29, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: docs/changelog.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,19 @@
2
2
3
3
All notable changes to this library will be documented in this file.
4
4
5
+
## [4.0.0] - 2020-05-05
6
+
7
+
### Added
8
+
9
+
-`BaseBatchMessageHandler` and `BatchMessageHandler` for handling messages in batches via prefetch count feature.
10
+
- Example of basic usages of batch message handlers.
11
+
12
+
### Updated
13
+
14
+
- Updated RabbitMQ.Client to the newest version 6.0.0. Made some changes according to the breaking changes that come with the newest version of RabbitMQ.Client.
15
+
- Moved message handlers to the different namespace `RabbitMQ.Client.Core.DependencyInjection.MessageHandlers`.
16
+
- Moved internal DI extensions to the different namespace `RabbitMQ.Client.Core.DependencyInjection.InternalExtensions`.
Copy file name to clipboardExpand all lines: docs/message-consumption.md
+78Lines changed: 78 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -311,6 +311,84 @@ The message handling process is organized as follows:
311
311
- If any exception occurs `IMessageHandlingService` acknowledges the message anyway and checks if the message has to be re-send. If exchange option `RequeueFailedMessages` is set `true` then `IMessageHandlingService` adds a header `"requeued"` to the message and sends it again with delay in 60 seconds. Mechanism of sending delayed messages covered in the message production [documentation](message-production.md).
312
312
- If any exception occurs within handling the message that has been already re-sent that message will not be re-send again (re-send happens only once).
313
313
314
+
### Batch message handlers
315
+
316
+
There are also a feature that you can use in case of necessity of handling messages in batches.
317
+
First of all you have to create a class that inherits a `BatchMessageHandler` class.
318
+
You have to set up values for `QueueName` and `PrefetchCount` properties. These values are responsible for the queue that will be read by the message handler, and the size of batches of messages.
The message handler will create a separate connection and use it for reading messages.
387
+
When the message collection is full to the size of `PrefetchCount` they are passed to the `HandleMessage` method.
388
+
Both `BaseBatchMessageHandler` and `BatchMessageHandler` implement `IDisposable` interface, so you can use it for release of resources.
389
+
390
+
Use this method of getting messages only when you sure that the number of messages that pass through this queue is really huge. Otherwise, messages could stack in the temporary collection of messages waiting to get in full.
391
+
314
392
For message production features see the [Previous page](message-production.md)
315
393
316
394
For more information about advanced usage of the RabbitMQ client see the [Next page](advanced-usage.md)
Copy file name to clipboardExpand all lines: readme.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -237,6 +237,49 @@ Exchange sections define how to bind queues and exchanges with each other using
237
237
238
238
For more information about `appsettings.json` and manual configuration features, see [rabbit-configuration](./docs/rabbit-configuration.md) and [exchange-configuration](./docs/exchange-configuration.md) documentation files.
239
239
240
+
## Batch message handlers
241
+
242
+
There are also a feature that you can use in case of necessity of handling messages in batches.
243
+
First of all you have to create a class that inherits a `BatchMessageHandler` class.
244
+
You have to set up values for `QueueName` and `PrefetchCount` properties. These values are responsible for the queue that will be read by the message handler, and the size of batches of messages.
The message handler will create a separate connection and use it for reading messages.
281
+
When the message collection is full to the size of `PrefetchCount` they are passed to the `HandleMessage` method. For more information, see the [message-consuming](./docs/message-consumption.md) documentation file.
282
+
240
283
## Advanced usage and nuances
241
284
242
285
RabbitMQ client implemented in this library (class which implements `IQueueService`) opens two connections to the RabbitMQ server. One connection is used for message production and the other one is for message consumption.
0 commit comments