Replies: 2 comments
-
We do plan to support batch publishing in a future version, for now its not possible. |
Beta Was this translation helpful? Give feedback.
0 replies
-
How many messages do you forsee sending in a batch? How big are the messages? Trying to get a sense of use cases for folks. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Nats.go has a js.Publish function, which is a synchronization interface. It ensures that messages arrive at nats-server in sequence, but the execution is slow. I have to wait for the response before invoking js.Publish again. In this way, only about 1000 messages can be published per second.
I hope to provide a "batch release" function, such as:
or
So I can send multiple messages in one invocation, and send them to the server in sequence, improving the throughput and transmission efficiency of the tcp link.
In addition:
Although the js.PublishAsync has high performance, it cannot guarantee the message delivery sequence and cannot meet my requirements.
My consumer needs to consume these messages one by one in sequence. When an error occurs, the consumption needs to be suspended. Therefore, it is not allowed to package messages and invoke the existing js.Publish.
I just want to shorten the execution time of js.Publish()
Thank you for your attention!
Beta Was this translation helpful? Give feedback.
All reactions