nats-io / stan.js

Node.js client for NATS Streaming
Apache License 2.0
292 stars 49 forks source link

Is the current version of the client compatible with NATS JetStream? #195

Closed SSchwaiger closed 3 years ago

SSchwaiger commented 3 years ago

I've replaced a NATS Streaming server with NATS JetStream and now my app is crashing during connection setup:

{"message":"stan: connect request timeout","stack":[{"file":"/Users/sebastianschwaiger/Documents/poc-backend/node_modules/node-nats-streaming/lib/stan.js","column":15,"line":312,"functionName":null},{"file":"/Users/sebastianschwaiger/Documents/poc-backend/node_modules/nats/lib/nats.js","column":14,"line":1930,"functionName":null},{"file":"node:internal/timers","column":17,"line":556,"functionName":"listOnTimeout"},{"file":"node:internal/timers","column":7,"line":499,"functionName":"processTimers"}]}

So the question is: is the client compatible with JetStream and I need to investigate the problem on my side or am I simply using the wrong client here?

Here's the Wireshark trace of a CONNECT message:

problematic example

I've tried a connection with the nats tool and that worked fine (for the "account info" command at least):

working example
aricart commented 3 years ago

@SSchwaiger JetStream is a completely different technology - the client for JetStream is under development. The stan client is for the nats-streamings-server only.