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

More documentation on signature and threads management #742

Open
pierre-yves-monnet opened this issue Nov 19, 2024 · 1 comment
Open

More documentation on signature and threads management #742

pierre-yves-monnet opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working docu enhancement New feature or request

Comments

@pierre-yves-monnet
Copy link

Describe the bug
More documentation, please

Why does the Handler method have an async? Is that mandatory? At high throughput, it leads to multiple problems. Do you think we can remove the async?
2/ Customer creates a .NET application with 60 workers. From time to time, it seems when a worker finishes a batch of 15, it waits 5 seconds before getting another batch, even if there are a lot of tasks.
When in the configuration, we specify 15 threads, is this 15 threads PER WORKER or for ALL THE 60 workers?

To Reproduce
No bug, more documentation

Expected behavior
A section in the documentation to explain if

Environment (please complete the following information):

Additional context

@pierre-yves-monnet pierre-yves-monnet added the bug Something isn't working label Nov 19, 2024
@pierre-yves-monnet pierre-yves-monnet added enhancement New feature or request docu labels Nov 19, 2024
@ChrisKujawa
Copy link
Collaborator

Hey maybe next time we can use the Discussions for such https://github.com/camunda-community-hub/zeebe-client-csharp/discussions

Sounds to me more like some questions/discussion topics and not an actual issue to fix.

  1. Why does the Handler method have an async? Is that mandatory? At high throughput, it leads to multiple problems. Do you think we can remove the async?

The job handler supports both (async and sync) to avoid such discussions and make the implementation easy as possible.
https://github.com/camunda-community-hub/zeebe-client-csharp/blob/main/Client/Api/Worker/IJobWorkerBuilderStep1.cs#L55-L104

Async/await is a common pattern in the .net world. If you see any weird behavior I doubt it is because of this, likely it is something different.

2/ Customer creates a .NET application with 60 workers. From time to time, it seems when a worker finishes a batch of 15, it waits 5 seconds before getting another batch, even if there are a lot of tasks.
When in the configuration, we specify 15 threads, is this 15 threads PER WORKER or for ALL THE 60 workers?

Not sure I can completely follow. Would be great if can share the complete configuration. But it is not unexpected that it might take a while until it polls the next tasks, depends on the configuration, and it might be even that tasks already locked by other workers. To completely answer this I need more context and details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docu enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants