Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit cb052f8

Browse files
Updated changelog.
1 parent 4edee64 commit cb052f8

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

docs/changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22

33
All notable changes to this library will be documented in this file.
44

5+
## [4.1.1] - 2020-05-30
6+
7+
### Fixed
8+
9+
- Fixed batch message handlers DI registering - the case when handlers are in use without RabbitMqClient.
10+
511
## [4.1.0] - 2020-05-17
612

713
### Added
814

915
- Ssl option while opening a RabbitMq connection with `TcpEndpoints`.
1016
- Example project of a basic ssl usage.
1117
- `StopConsuming` method for `IConsumingService`.
12-
- Retrying mechanism while creating an initial RabbitMq connection.
18+
- Retrying mechanism while creating an initial RabbitMq connection.
1319
- Integration and unit testing.
1420

1521
### Updated

docs/message-consumption.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,13 @@ The message handling process is organized as follows:
317317
There are also a feature that you can use in case of necessity of handling messages in batches.
318318
First of all you have to create a class that inherits a `BatchMessageHandler` class.
319319
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.
320+
You have to be aware that batch message handlers do not declare queues, so if it does not exists an exception will be thrown. Either declare manually or using RabbitMqClient configuration features.
320321

321322
```c#
322323
public class CustomBatchMessageHandler : BatchMessageHandler
323324
{
324325
readonly ILogger<CustomBatchMessageHandler> _logger;
325-
326+
326327
public CustomBatchMessageHandler(
327328
IRabbitMqConnectionFactory rabbitMqConnectionFactory,
328329
IEnumerable<BatchConsumerConnectionOptions> batchConsumerConnectionOptions,
@@ -333,9 +334,9 @@ public class CustomBatchMessageHandler : BatchMessageHandler
333334
}
334335

335336
public override ushort PrefetchCount { get; set; } = 50;
336-
337+
337338
public override string QueueName { get; set; } = "another.queue.name";
338-
339+
339340
public override Task HandleMessages(IEnumerable<string> messages, CancellationToken cancellationToken)
340341
{
341342
_logger.LogInformation("Handling a batch of messages.");
@@ -354,7 +355,7 @@ If you want to get raw messages as `ReadOnlyMemory<byte>` you can inherit base m
354355
public class CustomBatchMessageHandler : BaseBatchMessageHandler
355356
{
356357
readonly ILogger<CustomBatchMessageHandler> _logger;
357-
358+
358359
public CustomBatchMessageHandler(
359360
IRabbitMqConnectionFactory rabbitMqConnectionFactory,
360361
IEnumerable<BatchConsumerConnectionOptions> batchConsumerConnectionOptions,
@@ -363,11 +364,11 @@ public class CustomBatchMessageHandler : BaseBatchMessageHandler
363364
{
364365
_logger = logger;
365366
}
366-
367+
367368
public override ushort PrefetchCount { get; set; } = 3;
368369

369370
public override string QueueName { get; set; } = "queue.name";
370-
371+
371372
public override Task HandleMessages(IEnumerable<ReadOnlyMemory<byte>> messages, CancellationToken cancellationToken)
372373
{
373374
_logger.LogInformation("Handling a batch of messages.");

examples/Examples.BatchMessageHandler/AnotherCustomBatchMessageHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public AnotherCustomBatchMessageHandler(
2222

2323
public override ushort PrefetchCount { get; set; } = 5;
2424

25+
// You have to be aware that BaseBatchMessageHandler does not declare the specified queue. So if it does not exists an exception will be thrown.
2526
public override string QueueName { get; set; } = "another.queue.name";
2627

2728
public override Task HandleMessages(IEnumerable<string> messages, CancellationToken cancellationToken)

examples/Examples.BatchMessageHandler/CustomBatchMessageHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public CustomBatchMessageHandler(
2525

2626
public override ushort PrefetchCount { get; set; } = 3;
2727

28+
// You have to be aware that BaseBatchMessageHandler does not declare the specified queue. So if it does not exists an exception will be thrown.
2829
public override string QueueName { get; set; } = "queue.name";
2930

3031
public override Task HandleMessages(IEnumerable<ReadOnlyMemory<byte>> messages, CancellationToken cancellationToken)

src/RabbitMQ.Client.Core.DependencyInjection/RabbitMQ.Client.Core.DependencyInjection.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<LangVersion>latest</LangVersion>
6-
<Version>4.1.0</Version>
6+
<Version>4.1.1</Version>
77
<PackageTags>RabbitMQ</PackageTags>
88
<RepositoryUrl>https://github.com/AntonyVorontsov/RabbitMQ.Client.Core.DependencyInjection</RepositoryUrl>
99
<Company />

0 commit comments

Comments
 (0)