Hi,This is a first time I am trying out the Request/Response Pattern with MassTransit & RabbitMQ.
However the responder fails with RabbitMQ log message: "PLAIN login refused: user 'guest' - invalid credentials"
If I create a guest user on the bus then it works.
How can I explicitly provide credentials for IConsumeContext in the Responder?
I found similar thread in group here, but can't seem to figure out what resolution was made. It could be extremely simple solution. Appreciate any help.
Thanks.
Sender:
var msg = new ProcessStartMessage
{
WorkflowId = "Some Id"
Payload = "Some Data"
};
Factory.Create<IServiceBus>().PublishRequest(msg, ctx =>
{
ctx.Handle<ProcessCompleteMessage>(response => Console.Log("Process Complete"););
ctx.SetTimeout(30);
});
Responder:
public class WorkerProcess :
Consumes<ProcessStartMessage>.Context
{
public void Consume(IConsumeContext<ProcessStartMessage> context)
{
// Take care of some business here
var msg = new ProcessCompleteMessage
{
WorkflowId = "Some Id"
Payload = "Some Data"
};
try
{
// This here results in RabbitMQ Error
// Error: "PLAIN login refused: user 'guest' - invalid credentials"
context.Respond(msg);
}
catch (Exception ex)
{
// Log Errors
}
}
}