Repository navigation
SW-Bus 10.1: RabbitMQ.Client 7, per-queue concurrency, publisher confirms, drain - #90
Merged
Merged
Conversation
…irms, drain - RabbitMQ.Client 6.8.1 to 7.2.2; package major 11. - Per-queue consumer concurrency: ConsumerOptions.Concurrency, AddQueueOption(concurrency:), BusOptions.DefaultConsumerConcurrency (default 1, the 10.x behaviour). Each queue's channel is created with that dispatch concurrency; prefetch still caps it. A refresh that changes it moves the consumer to a new channel and retires the old one once its running messages are acknowledged, so nothing is processed twice. - Publisher confirms (BusOptions.PublisherConfirms, default true): a publish completes when the broker has the message and throws otherwise. One channel per DI scope, opened on first publish, instead of one shared channel for the process. - BusConnection: publisher and consumer connections opened asynchronously after the host starts, exchanges declared there with retries; AddBus and AddBusPublish no longer connect. The client's automatic recovery owns reconnects and topology. IBusConnectionStatus reports whether the bus is connected. - Drain on stop (BusOptions.DrainTimeout, default 30 s): no new message starts, consumers are cancelled, running messages finish and ack, the rest return to their queue. Channel and connection closes are bounded because client 7 waits for running handlers on close. - Queue names, arguments, bindings, retry and bad queue TTLs and exchanges unchanged; the bad-queue copy drops the client's x-dotnet-pub-seq-no header as it drops x-death. - Integration tests for concurrency, order at 1, confirms, broker restart, boot with the broker down, drain, retry and bad queue; README options, behaviour and upgrade notes.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 21
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves SW.Bus to RabbitMQ.Client 7 and publishes it as 10.1.0 (a minor release, not 11.0).
What changes
ConsumerOptions.Concurrency,AddQueueOption(concurrency:),BusOptions.DefaultConsumerConcurrency. The default is 1, the same as 10.0. Prefetch still caps it, and changing it on refresh moves the consumer to a new channel without processing anything twice.BusOptions.PublisherConfirms, default true): a publish completes only when the broker has the message, and throws otherwise. There is one publish channel per DI scope instead of one shared channel.AddBusandAddBusPublishno longer connect. The client's automatic recovery handles reconnects.IBusConnectionStatusreports whether the bus is connected.BusOptions.DrainTimeout, default 30 s): running messages finish and are acked, and the rest go back to their queue.Before upgrading
PublisherConfirms = falseto keep the 10.0 behaviour.Tests
Merging to
mainpublishes SimplyWorks.Bus, SimplyWorks.Bus.RabbitMqExtensions and SimplyWorks.Bus.RabbitMqViewer 10.1.0 to nuget.org.