Open Bykiev opened 2 weeks ago
we see this error sometimes. I'm assuming it happens intermittently and you have other consumers on the same connection. it may be head of line blocking. my guess is you can use keyed services and use a seperate connection for your consumers which may flood the connection.
edit: we also had reports of network issues e.g. using public IP of your cloud VM which might have DDoS protection
Yes, we have a multiple consumers. We did some tests and I can see this error even with 10 connections in a pool. We've updated the NATS server docker image to v2.10.19, seems the problem still exists. What can we do to use NATS JS with multiple consumers?
After some time we didn't get any data via JS on some of the consumers, it seems the connection is dropped by someone or smth else is happened.
I did some research and this seems to be DI or pooler issue. I've removed the DI part from the project and created a single connection for watcher and another one for writing. This is working without any issues.
I did some research and this seems to be DI or pooler issue. I've removed the DI part from the project and created a single connection for watcher and another one for writing. This is working without any issues.
this is interesting. pooler is just a simple round robin of connections. are you on slack.nats.io maybe we can have a chat there.
edit: you should also be able to used keyed DI in you're using net8
are you on slack.nats.io maybe we can have a chat there
Unfortunately, It's not available in my country. I've created another issue https://github.com/nats-io/nats.net/issues/621, can be related to this issue
Observed behavior
When creating a singleton connection to NATS JetStream the error is thrown:
My config:
We've tried to use a connection pool with 1000 connection and everything is working as expected. Maybe it's not possible to subscribe and update the same store using one connection? I didn't find any information about it in the docs. And if it's not possible, how many connections should be in a connection pool?
Expected behavior
No exception is thrown when NATS is registered as singleton
Server and client version
NATS server 2.10.18 NATS .NET v2.3.3
Host environment
Docker image
Steps to reproduce
No response