Multiple workers on one consumer and monitoring lag in JetStream
At the end of the previous post I promised two topics: running more than one worker, and watching how far behind the workers are. One worker is fine until messages arrive faster than it can process them. This post answers two questions: how do I add workers without processing anything twice, and how do I know the queue is backing up? Everything below ran against an embedded nats-server (JetStream enabled, temp store dir) and nats.go v1.54.0, on Go 1.26. The outputs are from those runs. ...