refactor(publisher)!: simplify AddMessagingServicePublisher registration

Replace the MessagingServicePublisherConfiguration builder with plain overloads that accept either a configuration delegate or IConfiguration. Update EmailSender and the publisher integration test to the new API, and mark the static EmailSender obsolete ahead of the new client.

BREAKING CHANGE: AddMessagingServicePublisher no longer accepts a builder configuration delegate.
This commit is contained in:
2026-11-04 14:53:01 +01:00
parent 51d8931dbe
commit ad2a5240d2
4 changed files with 23 additions and 42 deletions

View File

@@ -24,7 +24,7 @@ public sealed class SendingEmailPublisherTests : IAsyncDisposable
{
var services = new ServiceCollection();
services.AddLogging();
services.AddMessagingServicePublisher(cfg => cfg.AddRabbitMqConnectionFactory(RabbitMqTestConfig.Apply));
services.AddMessagingServicePublisher(RabbitMqTestConfig.Apply);
_serviceProvider = services.BuildServiceProvider();
_publisher = _serviceProvider.GetRequiredService<ISendingEmailPublisher>();