1

I have written publisher, Subscriber in Java. Did clustering as well at server level. Able to publish and subscribe messages of 30 KB with the rate of 500 TPS (transaction per second).

But I want to improve our performance up to more than 2000 TPS. Please suggest how to achieve the same.

I have used Java with Apache Camel.

1 Answers1

2

You used the nats-streaming-server tag. Just making sure if you are referring to NATS Streaming or NATS.

When it comes to NATS Streaming, the publish call is a request-reply with the server, so it is slower. If you provide an AckHandler, you will be able to publish faster since the publish call is now non-blocking. The server still sends publish acknowledgement, but the handler is invoked asynchronously. See https://github.com/nats-io/java-nats-streaming#asynchronous-publishing for usage example.

I. Kozlovic
  • 796
  • 3
  • 3