question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adjusting concurrency when AddConsumers is used?

See original GitHub issue

I’m using the serviceCollection.AddConsumers method to add all my consumers from my assembly to the IOC container.

However, with this approach, how can I adjust each consumer’s settings?

Also, I have not yet figured out how MassTransit works in terms of concurrency (and it is not stated in the documentation as far as I can see).

How many threads per consumer will MassTransit run? Or is it only X amount of threads across everything?

How can I ensure that the congestion of one queue (long running consumers of one message type) doesn’t prevent consumers of other message types of still running?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
phatboygcommented, Oct 30, 2019

You can’t adjust the prefetch for a specific consumer, but you can for the receive endpoint. You can only adjust the concurrency level for a specific consumer. Depending upon the transport, it will automatically figure it out when you specify a concurrent message limit in the consumer definition.

0reactions
phatboygcommented, Nov 1, 2019

This isn’t an issue with MassTransit, so I’m closing it. Feel free to carry on the discussion elsewhere, like Gitter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consumers
Consumer is a widely used noun for something that consumes something. ... call one of the AddConsumer methods and call ConfigureEndpoints as shown...
Read more >
MassTransit multiple Consumers
I solved it by this var consumer = new ConsumerA(); _bus = Bus.Factory.CreateUsingInMemory(cfg => { cfg.ConcurrentMessageLimit = 1; }); _bus ...
Read more >
Consumer concurrency - Queues
Queue consumers will automatically scale up to the maximum concurrent invocations as needed to manage a queue's backlog and/or error rates.
Read more >
Message Groups - ActiveMQ - The Apache Software Foundation!
When a message is being dispatched to a consumer, the JMSXGroupID is checked. If one is present then the broker checks to see...
Read more >
Chapter 4. Kafka Consumers: Reading Data from Kafka
You add consumers to an existing consumer group to scale the reading and processing of messages from the topics, so each additional consumer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found