public async Task Test()
{
IBusControl busControl = Bus.Factory.CreateUsingRabbitMq(x =>
{
var host = sbc.Host(new Uri("rabbitmq://localhost"), h =>
{
h.Username("guest");
h.Password("guest");
});
sbc.ReceiveEndpoint(host, "test_queue", ep =>
{
ep.Handler<YourMessage>(context =>
{
return Console.Out.WriteLineAsync($"Received: {context.Message.Text}");
});
});
});
BusHandle handle = null;
try
{
// Throws an exception because RabbitMQ is not running
handle = await busControl.StartAsync();
}
catch (RabbitMqconnectionexception ex)
{
// Should throw another exception, but it doesn't
handle = await busControl.StartAsync();
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/64dffa08-c212-4046-a064-a69423ea9b65%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.