Closed dagenius007 closed 4 years ago
Please refrain from updating all closed issues from different client libraries and server.
Getting invalid publish when the server is down is expected. Can you describe better your issue?
Sorry about that @kozlovic. The server is not down. I meant after restarting my server.
So I read this from the docs
By default, the NATS Streaming Server stores its state in memory, which means that if the streaming server is stopped, all state is lost. On server restart, since no connection information is recovered, running applications will stop receiving messages and new published messages will be rejected with an invalid publish request error.
I don't if you can help out?
So are you running with memory store or file store?
Memory store
Well, then as stated in the documentation, it is normal since the restarted server has no state and so your current connection does not exist on this server. You would need to recreate connection (and subscriptions if applicable) or use a server with file store or SQL store: https://docs.nats.io/nats-streaming-server/configuring/persistence
I keep getting invalid publish request after my nats server goes.