watermill icon indicating copy to clipboard operation
watermill copied to clipboard

[watermill-nats] Watermill command bus cannot recover from "stan: connection closed" on Stan restart

Open zdraganov opened this issue 2 years ago • 0 comments

Used in Kubernetes environment have to reschedule the Stan pod, which changed the underlying IP address which it used. After that the command bus was constantly throwing "sending message failed: stan: connection closed" error even if the pod has successfully rescheduled.

I've checked the Publisher class in the package here https://github.com/ThreeDotsLabs/watermill-nats/blob/master/pkg/nats/publisher.go#L84-L108

In my scenario the app connects to the Stan service via DNS (Kubernetes service).

zdraganov avatar Feb 07 '22 14:02 zdraganov