Replies: 1 comment 2 replies
-
Maybe something for https://github.com/synadia-io/orbit.java ? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
@scottf commented https://github.com/nats-io/nats.java/issues/934#issuecomment-2711005997 about the possibility to pass an executor to be used in the client internally:
I looked through the code, and it looks like the executor is not used by async methods like: publishAsync and connectAsynchronously. But it wouldn't boost the performance greatly, when newVirtualThreadPerTaskExecutor() is passed and used in such methods?
There is a great potential to extend the client and improve performance by utilizing such an executor and making a true reactive interface for the client, by simply providing another possibility to do every thing async in addition to the sync methods - similar to publishAsync and connectAsynchronously, that way the whole client can become incredibly faster. Maybe using a NatsAsync class, that encapsulates all the reactive functionality, to not pollute the client with an additional xAsync versions for everything. Will not be as beneficial with platform threads, but will make the clients at least usable in a non-blocking set up, where blocking calls are not tolerated (a use case I'm having right now).
This might make the vertx client redundant too, which is not really as performant as it actually could be (a wrapper around the current client)?
If that is a considerable option to include in the client, I'd love to tinker with that in a dedicated fork.
Beta Was this translation helpful? Give feedback.
All reactions