username and password

This commit is contained in:
2026-03-18 17:42:16 +01:00
parent 9147c2c799
commit afcdaea4fd
@@ -18,9 +18,19 @@ namespace Musify.Infrastructure.Messaging
var section = configuration.GetSection("MassTransit");
var host = section["Host"]
?? throw new InvalidOperationException("MassTransit:Host configuration is missing.");
?? throw new InvalidOperationException("MassTransit:Host configuration value not found.");
busFactoryConfigurator.Host(host);
var username = section["Username"]
?? throw new InvalidOperationException("MassTransit:Username configuration value not found.");
var password = section["Password"]
?? throw new InvalidOperationException("MassTransit:Password configuration value not found.");
busFactoryConfigurator.Host(host, options =>
{
options.Username(username);
options.Password(password);
} );
busFactoryConfigurator.ReceiveEndpoint(PictureResizerConsumer.QueueName, endpointConfigurator =>
{