Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Best practice of size of ExecutorService when constructing EventProcessorHost #369

Closed
warrenzhu25 opened this issue Aug 20, 2018 · 1 comment

Comments

@warrenzhu25
Copy link

Questions as below:

  1. How should we size this ExecutorService? Should the size be equal the number of partition divides the number of hosts?
  2. What's the purpose of this ExecutorService? Is this only used for receiving the message? or also doing checkpoint?
@JamesBirdsall
Copy link
Contributor

The ExecutorService is used for almost all operations within EPH, including both receiving and doing checkpoints. If you don't supply one, EPH will create a default one, which currently has 16 threads. That seems to work well for the majority of cases. For large event hubs, such as 64 partitions or higher, a larger thread pool might help. It is hard to provide definite recommendations because IEventProcessor.onEvents also runs in this thread pool, and the performance and complexity of the user's code can affect how many threads are available to do other work. In general, if event processing seems slow, trying an ExecutorService with a larger number of threads available is an easy experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants