async subscription Thread creation
See original GitHub issuecurrently async subscriptions create a Thread
per active subscription - this is problematic for even moderately large numbers of active subscriptions - with a 64-bit vm default Thread
stack size of 1MB then 10k connections leads to a minimum 10GB memory requirement before doing any actual processing
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Does the use of async/await create a new thread?
In short NO. From Asynchronous Programming with Async and Await : Threads. The async and await keywords don't cause additional threads to be...
Read more >Asynchronous Subscriptions - NATS Docs
Asynchronous subscriptions use callbacks of some form to notify an application when a message arrives. These subscriptions are usually easier to work with, ......
Read more >Using thread pools for asynchronous processing
A thread pool can reuse previously created threads to execute the current task so that the thread is already available when the request...
Read more >Getting Started | Creating Asynchronous Methods - Spring
This guide walks you through creating asynchronous queries to GitHub. ... Spring's @Async annotation, indicating that it should run on a separate thread....
Read more >Pull subscriptions | Cloud Pub/Sub Documentation
You can use the pull mode to perform asynchronous or synchronous message processing. The pull mode runs in a client library that can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mccraigmccraig , @jtdudley2 , Thank you for raising and evaluating this issue. This is an issue that spans a few of our clients. While it’s been addressed elsewhere, unfortunately it has not been addressed here in the java client yet. I’ve opened #114 to add this feature by the next release.
I was evaluating nats-io and ran across the same thing.
I did a quick proof of concept to change this behavior to use a single dispatch thread for async subscriptions.
https://github.com/jtdudley2/java-nats/commit/d075adf67b853ef73d5b949f4280b88848708106