Replace the hard-coded RabbitMQ setup with NotificationOptions bound from a configurable section. The new ConsumerType switch wires either the HTTP API client or the RabbitMQ client, and startup now fails with a clear error when required settings are missing. Bump DigitalData.MessagingService.Client to 3.0.1 for the abstraction used by both transports.
17 lines
427 B
C#
17 lines
427 B
C#
using DigitalData.MessagingService.RabbitMQ;
|
|
|
|
namespace EnvelopeGenerator.Infrastructure.Notification.Configuration;
|
|
|
|
public class NotificationOptions
|
|
{
|
|
public const string SectionName = "Notification";
|
|
|
|
public ConsumerType ConsumerType { get; set; }
|
|
|
|
public string? ApiUrl { get; set; }
|
|
|
|
public string SenderEmail { get; set; } = null!;
|
|
|
|
public RabbitMqConnectionConfiguration? RabbitMQ { get; set; }
|
|
}
|