Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
zarusz committed Dec 25, 2024
1 parent 7b81940 commit fe780ad
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions docs/provider_rabbitmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Please read the [Introduction](intro.md) before reading this provider documentat
- [Request-Response](#request-response)
- [Topology Provisioning](#topology-provisioning)
- [Not Supported](#not-supported)
- [Recipes](#recipes)
- [01 Multiple consumers on the same queue with different concurrency](#01-multiple-consumers-on-the-same-queue-with-different-concurrency)
- [Feedback](#feedback)

## Underlying client
Expand Down Expand Up @@ -365,6 +367,33 @@ This might be useful in case the SMB inferred topology is not desired or there a
- [Default type exchanges](https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchange-default) are not yet supported
- Broker generated queues are not yet supported.

## Recipes

### 01 Multiple consumers on the same queue with different concurrency

The same `queue` will be used to consume messages, however there will be internal message processors running with different concurrency (10 and 1) depending on the message routing key.

```csharp
services.AddSlimMessageBus(mbb =>
{
mbb.Produce<PingMessage>(x => x
.Exchange("exchange", exchangeType: ExchangeType.Direct)
.RoutingKeyProvider((m, p) => m.Label));

// messages with blue routing key will get 1 concurrency
mbb.Consume<PingMessage>(x => x
.Queue("queue", autoDelete: false)
.ExchangeBinding("orders", routingKey: "blue")
.Instances(1));

// messages with red routing key will get 10 concurrency
mbb.Consume<PingMessage>(x => x
.Queue("queue", autoDelete: false)
.ExchangeBinding("orders", routingKey: "red")
.Instances(10));
});
```

## Feedback

Open a github issue if you need a feature, have a suggestion for improvement, or want to contribute an enhancement.
2 changes: 1 addition & 1 deletion src/Host.Plugin.Properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="Common.NuGet.Properties.xml" />

<PropertyGroup>
<Version>2.6.2-rc13</Version>
<Version>2.7.0</Version>
</PropertyGroup>

</Project>

0 comments on commit fe780ad

Please sign in to comment.