--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/8ebef314-b573-49a2-884d-3d0a12999720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Concurrency is configured before the consumer, so it shouldn't matter. If you're loading from the container, and using the Autofac assembly, just do the following:containerBuilder.RegisterType<MyConsumer>();var container = containerBuilder.Build();cfg.ReceiveEndpoint("input-queue", x =>{x.UseConcurrencyLimit(1);x.UseConsumer<MyConsumer>(container);});By passing the container, it will automatically configure the AutofacConsumerFactory<MyConsumer>() for you.
On Fri, Jan 20, 2017 at 10:27 AM, Adam Schaible <adam.s...@gmail.com> wrote:
Hello!Any help would be appreciated ... I found the AutofacConsumerFactory but I'm not sure how that should be used in the cleanest way.Let's say I use LoadFromContext() and then want to adjust the concurrency limit of a single consumer - is that possible?If not, what would be the best way to register consumers individually using Autofac?Thanks!
--
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 masstrans...@googlegroups.com.
using GreenPipes;
...
builder.RegisterType<ProcessFileMessageHandler>().AsSelf();
builder.Register(c => Bus.Factory.CreateUsingRabbitMq(sbc =>
{
var host = //host configuration
sbc.ReceiveEndpoint(host, "queueName", ep =>
{
ep.UseConcurrencyLimit(1); //Syntactically OK, but not sure if it will work
ep.LoadFrom(c);
});
}