Releases: atidev/ATI.Services.RabbitMQ
Releases · atidev/ATI.Services.RabbitMQ
v12.1.2
v12.1.1
v12.1.0
What's Changed
Full Changelog: v12.0.0...v12.1.0
More details...
DotNet8
Dotnet8 + CI
Configurable queue and consumer.
Create subscription with queueConfiguration and consumerConfiguration.
Example
var binding = rmqTopology.CreateBinding(
"exchange_name",
"routing_key", isExclusive: false, isDurable: true, isAutoDelete: false,
queueConfiguration: c =>
{
c.AsExclusive(false); // will be overriden by param isExclusive
c.AsDurable(false); // will be overriden by param isDurable
c.AsAutoDelete(false); // will be overriden by param isAutoDelete
c.WithArgument("x-normal-size", 1000);
c.WithArgument("message-ttl", 60000); //sets message-ttl for this queue
},
consumerConfiguration: c => c.WithPrefetchCount(1)); // sets prefetch=1 for this consumer
await eventbusManager.SubscribeAsync(contactOverLimitBinding, Handler);
Handler with Ack strategies
Added message handler overload that allows to use different Ack strategies.
Example
private async Task<AckStrategy> Handler(byte[] body, MessageProperties prop, MessageReceivedInfo info)
{
if (body == ...)
{
//some work
return AckStrategies.Ack;
}
return AckStrategies.NackWithRequeue;
}
v12.0.0
What's Changed
Quorum queue by @muphblu and @Draktolli in #25
- all queues now are
quorum
type by default (previouslyclassic
) - exclusive, auto-delete or non-durable queue will throw exception during creation
- if queue's name not changed then exception will be thrown(due to queue type changed)
How to use:
- Update libs
- Change names for queues where loosing messages is critical
- For exclusive, auto-delete or non-durable queues change value to the opposite or specify
QueueType: classic
. - release/deploy. Expect exceptions if you didn't changed names at step 2(they).
- Drop old queues after release. Exceptions should be gone by now.
Full Changelog: v11.0.0...v12.0.0
v11.0.0
- Supports
atisu.services.common v15.0.0
(MetricsFactory
is used from DI) - https://github.com/atidev/ATI.Services.Common/releases/tag/v15.0.0
v10.0.2 Fixes and add delayed re-queue mechanism for handling failed messages.
v10.0.1
v10.0.0
What's Changed
New metrics and DotNet7 by @muphblu in #22.
New metrics
Now we use different metrics for publish and subscribe, added label exchange_routing_key_name
for both of them and rmq_app_id
for subscribe metrics.
Example:
common_metric_rabbitmq_subscribe{exchange_routing_key_name= "exchange:routeKey", rmq_app_id="AppId from incoming messages or Unknown"}
common_metric_rabbitmq_publish{exchange_routing_key_name="exchange:routeKey"}
Full Changelog: v9.1.0...v10.0.0
v9.1.0
What's Changed
- Update newtonsofthjson and RabbitMQ by @muphblu in #19
- upgrades atisu.services.common due to newtonsoft.json vulnerability
- upgrades EasyNetQ to v7.4.3 due to dependency from vulnerable newtonsoft.json version
Full Changelog: v9.0.2...v9.1.0
v9.0.2
What's Changed
Bugfixes
- fixes exception that occurs in case of handling rmq message with unsupported locale(message will be lost), now it will be handled with default locale
Changes
- Resubscribe logic added, now all queues will be created in case of connection problems with rmq.
Details
On `Connected` event the following will happen:- create and bind to exchange all subscriptions
- for exclusive queues also
.Consume(...)
will be invoked (for ordinal queues we'll reuse consumer created on init)
Full Changelog: v9.0.1...v9.0.2