Skip to content

Comments

Simplify RabbitMQ setup and documentation#15

Merged
atakanatali merged 1 commit intomainfrom
codex/refactor-rabbitmq-integration-for-automatic-setup
Jan 12, 2026
Merged

Simplify RabbitMQ setup and documentation#15
atakanatali merged 1 commit intomainfrom
codex/refactor-rabbitmq-integration-for-automatic-setup

Conversation

@atakanatali
Copy link
Owner

@atakanatali atakanatali commented Jan 12, 2026

Motivation

  • Make UseRabbitMq() the single-call integration for RabbitMQ so samples and consumers no longer need manual option binding or singleton registrations.
  • Prefer binding broker settings from Notify:Broker:RabbitMq while remaining compatible with a legacy RabbitMq root section.
  • Resolve queue prefix automatically from NotifyOptions.QueuePrefix or IHostEnvironment.ApplicationName to simplify sample code.
  • Ensure the standard queues (email/sms/push) are declared at startup to avoid manual topology setup in samples.

Description

  • INotifyBuilder.UseRabbitMq now registers RabbitMqOptions binding via a new RabbitMqOptionsConfigurator, applies optional overrides with PostConfigure, and registers a singleton RabbitMqBrokerClient and corresponding IBrokerPublisher, IBrokerConsumer, and IBrokerClient mappings.
  • Added ResolveRabbitMqSection and ResolveQueuePrefix logic and the nested RabbitMqOptionsConfigurator to bind from Notify:Broker:RabbitMq with a fallback to RabbitMq, and to pick a queue prefix from NotifyOptions or host name.
  • RabbitMqBrokerClient was extended with EnsureStandardQueues() and topology declaration improvements so standard queues are created when the client is instantiated.
  • Updated sample apps and README.md to remove manual RabbitMqOptions binding and singleton registrations and document the new Notify:Broker:RabbitMq config path; updated project references (Notify.Core / Notify.Broker.RabbitMQ csproj changes) and removed the empty RabbitMqOptions from Notify.Core.

@atakanatali atakanatali removed the codex label Jan 12, 2026
@atakanatali atakanatali merged commit 14a6881 into main Jan 12, 2026
1 check failed
@atakanatali atakanatali deleted the codex/refactor-rabbitmq-integration-for-automatic-setup branch January 12, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant