Skip to content

Add support for configuring Pulsar client IO and listener threads #42052

New issue

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

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

Already on GitHub? # to your account

Closed

Conversation

vpavic
Copy link
Contributor

@vpavic vpavic commented Aug 28, 2024

This commit adds configuration properties that allow users to configure number of IO threads and listener threads used by the Pulsar client.


From my experience with Pulsar, using these settings is often needed to achieve the optimal setup of the Pulsar client so ideally Spring Boot's auto-config would provide a way to do this using configuration properties.

/cc @onobc

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 28, 2024
@onobc
Copy link
Contributor

onobc commented Aug 28, 2024

From my experience with Pulsar, using these settings is often needed to achieve the optimal setup of the Pulsar client so ideally Spring Boot's auto-config would provide a way to do this using configuration properties.

Thanks for the contribution @vpavic . When we brought the auto-configuration into Spring Boot we greatly reduced the number of configuration properties we supported. We wanted the community to let us know which properties were important. Thank you for doing that here. Let's see what the Boot team thinks.

@philwebb
Copy link
Member

It sounds like they'd be useful for a lot of apps so I'm in favor of adding them. I wonder if we should put them under a nested Threads class (similar to server.tomcat.thread.<name>)?

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 29, 2024
@philwebb philwebb added this to the 3.4.x milestone Aug 29, 2024
@onobc
Copy link
Contributor

onobc commented Aug 29, 2024

It sounds like they'd be useful for a lot of apps so I'm in favor of adding them. I wonder if we should put them under a nested Threads class (similar to server.tomcat.thread.<name>)?

I think grouping them under thread would be a good forward-thinking idea. The naming here is interesting....

  • ioThreads -> thread.num-io or thread.io ?
  • listenerThreads -> thread.num-listener or thread.listener ?

@philwebb
Copy link
Member

I would suggest something similar to existing tomcat ones. threads.io and threads.listener would be my suggestion.

This commit adds configuration properties that allow users to configure
number of IO threads and listener threads used by the Pulsar client.
@vpavic vpavic force-pushed the pulsar-client-threads-config branch from 35016e6 to 58ca1b9 Compare August 29, 2024 21:49
@vpavic
Copy link
Contributor Author

vpavic commented Aug 29, 2024

I've updated the PR accordingly.

philwebb pushed a commit that referenced this pull request Sep 2, 2024
Add configuration properties that allow users to configure number
of IO threads and listener threads used by the Pulsar client.

See gh-42052
@philwebb philwebb closed this in c06027b Sep 2, 2024
@philwebb philwebb modified the milestones: 3.4.x, 3.4.0-M3 Sep 2, 2024
@philwebb
Copy link
Member

philwebb commented Sep 2, 2024

Thanks @vpavic! Merged into main.

@vpavic vpavic deleted the pulsar-client-threads-config branch September 2, 2024 08:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants