Prefetch limited to 16?

41 views
Skip to first unread message

Adam Schaible

unread,
Feb 12, 2018, 4:49:04 PM2/12/18
to masstransit-discuss
Hi Guys,

Using MT 3.5.7 (long time user of MT).  I'm running into a message throughput issue with a service that makes a lot of outbound HTTP requests per message (and thus lots of waits).  I'd really like to get a lot of threads active at once to deal with this, but I'm running into a limit where no matter what I set prefetch to, only 16 message show as "unacked" in the RMQ UI.

Is there any way to get more threads working here?

Thanks,
-Adam

Chris Patterson

unread,
Feb 13, 2018, 1:05:21 PM2/13/18
to masstrans...@googlegroups.com
How are you configuring the receive endpoint? It should allow anything you specify.


--
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/ef18aea5-17d0-4604-9454-62628177ee00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Schaible

unread,
Feb 13, 2018, 1:20:28 PM2/13/18
to masstransit-discuss
Hi Chris,

Thanks a lot for the reply!  I am using the Autofac extension, so this is what my receive endpoint configuration looks like:

cfg.ReceiveEndpoint("queue_name", ec =>
{
ec.LoadFrom(context);
});

Is there a way to configure concurrency in there?

Later I'm doing:

cfg.PrefetchCount = 9999;

With no noticeable changes when I adjust this setting.

Thanks!
-Adam

Chris Patterson

unread,
Feb 13, 2018, 4:49:10 PM2/13/18
to masstrans...@googlegroups.com
ec.PrefetchCount...


--
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.

Adam Schaible

unread,
Feb 13, 2018, 4:59:24 PM2/13/18
to masstransit-discuss
Hi Chris,

That property doesn't appear to be there for me.

That said, I believe the issue was more around the number of vCPU's assigned to the virtual machine.  After a windows update, that was reset to 1.

Thanks,
-Adam

Chris Patterson

unread,
Feb 14, 2018, 10:49:40 AM2/14/18
to masstrans...@googlegroups.com
It should be there, it's where it has to be set. The virtual CPU count has nothing to do with it other than the default setting.



--
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.

Adam Schaible

unread,
Mar 15, 2018, 10:36:59 AM3/15/18
to masstransit-discuss
Hi Chris,

As usual, thank you for the reply.  I'm still struggling with this a bit - could you take another look?  I don't see anything in the IReceiveEndpointConfigurator to set the prefect count.

I do see it on the RabbitMqBusFactoryConfigurator - I assume if you setup multiple receive endpoints it would apply this setting to all instances (testing that now).

Thanks,
-Adam

Adam Schaible

unread,
Mar 15, 2018, 11:00:36 AM3/15/18
to masstransit-discuss
Hi Chris,

One more update - I was using an overload that doesn't accept the host - which doesn't appear to expose the PrefetchCount property.  If I change to the overload that accepts host as the first parameter, the PrefetchCount is there - however using the autofac extension, using this overload doesn't start any consumers.

Thanks,
-Adam

Chris Patterson

unread,
Mar 15, 2018, 8:55:06 PM3/15/18
to masstrans...@googlegroups.com
Yes, you need to use the RabbitMQ extension that includes those properties.

I'm not sure why it would matter which method you use for Autofac to register consumers, they both call the same methods under the hood. Exactly the same methods actually.

Do you have a test that reproduces the error, or a console app?


--
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.

Adam Schaible

unread,
Mar 19, 2018, 10:44:35 AM3/19/18
to masstransit-discuss
Hi Chris,

Thanks for the reply!

After doing some more testing, it seems like my issue was temporary.  I tried it again today and it worked fine.

Thanks!
-Adam
Reply all
Reply to author
Forward
0 new messages