feat(notification): make messaging consumer configurable
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.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user