Skip to content
Advertisement

NATS Stream creation fail

When I try to create a stream on the local NATS server get the error. The connection established successfully but on jsm.addStream(conf) request broke.

I’m using maven artifact:

JavaScript

Method connection:

JavaScript

Call:

JavaScript

NATS running inside docker conainer on localhost:

JavaScript

But when I call endpoint get the error:

JavaScript

What is the problem in my solution?

Advertisement

Answer

The problem is the way to open the stream. Correct solution:

JavaScript

And send async:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement