I have a consumer that has a dependency on an external service that rate-limits calls. If I let MT loose it runs right into this limit and requests start to fail. Is there a way to throttle the number of concurrent consumers with a running bus instance? Is there a way of stopping consumers? (i.e. pause consuming from the queue?)Thanks
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/masstransit-discuss/-/RkMCOkIwyIIJ.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.
If all consumers are located inproc then I would use a semaphore to limit the concurrent number of threads. Just request a semaphore before making external call and release it when done. The starting number of available semaphores will be the maximum number of concurrent external callers. Relatively simple and contained inside the consumer without the need of another layer.
Although if you start cloning the consumer out to several nodes then you'll need a distributed semaphore as well, unless each node gets it's own number of available external call slots that is.
- Erik
Den fredagen den 6:e juli 2012 kl. 02:49:01 UTC+2 skrev kreiggers:Yes I can use that but was hoping to find a more dynamic way of doing it. The problem is I don't know how many consumers I can use. The 90% case I can go as fast as I can, (not every message will cause a hit to the external service as we have some caching) but that won't work if there's a lot of hits.Thinking that I may have to put another layer of messaging in between these two cases and have the first layer use the max consumers and have a gateway to the external service run with only a couple of consumers.
----Craig Beck
--
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-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/masstransit-discuss/-/gKTRu9LvsC4J.
For more options, visit https://groups.google.com/groups/opt_out.
--
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-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/03d3821f-886b-4fc3-8775-27462f5c5c2a%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-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/6aa5dc86-ee47-4c24-8c0c-1e8859e5f96a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.