Skip to content

Use work pool and dispatch executor for incoming message processing #162

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

Merged
merged 4 commits into from
Mar 12, 2025

Conversation

acogoluegnes
Copy link
Collaborator

References #160

It is based on the mechanism the RabbitMQ AMQP 091 Java client uses.
The work pool accumulates the message processing tasks and a work
service dispatches the work blocks to an executor.

Each connection creates its own executor service if none is set. An
executor service can be set at the environment level and shared between
all connections. An executor service can be set at the connection level
as well.

References #160
@acogoluegnes acogoluegnes force-pushed the set-dispatching-executor-service branch from d2ab691 to 6fab398 Compare March 11, 2025 15:29
@acogoluegnes acogoluegnes changed the title Add dispatching executor service setting to connection and consumer Use work pool and dispatch service for incoming message processing Mar 11, 2025
Copy link

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment/suggestion, unless you worry about asterisk imports and would like to get rid of them.

Thanks

@acogoluegnes acogoluegnes marked this pull request as ready for review March 11, 2025 17:38
It allows other abstractions like Spring's TaskExecutor to be used.

References #160
@acogoluegnes
Copy link
Collaborator Author

@artembilan Thanks for the review, I used the Executor type for the dispatching executor. I'll see if I can use Executor in other places (not in this PR though).

About the asterisk/wildcard imports, it must be because of my IntelliJ settings. They indeed can be inconvenient while coding (mostly with AssertJ native/custom Assertions in my case). If you have a solution to remove them without too much hassle, I'm open to apply it, otherwise I'll clean them along the way.

@acogoluegnes acogoluegnes merged commit 2bdcfaf into main Mar 12, 2025
1 check passed
@acogoluegnes acogoluegnes deleted the set-dispatching-executor-service branch March 12, 2025 11:11
@acogoluegnes acogoluegnes changed the title Use work pool and dispatch service for incoming message processing Use work pool and dispatch executor for incoming message processing Mar 12, 2025
github-actions bot pushed a commit that referenced this pull request Mar 12, 2025
Use work pool and dispatch executor for incoming message processing
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

Successfully merging this pull request may close these issues.

2 participants