I have an admittedly special case where multiple subscriptions subscribe to the same subject in the same application.
In case of a slow subscriber, it's currently hard to figure out exactly which subscription is causing the error:
in the error callback only the subject and queue are available:
natsErrHandler(nc *nats.Conn, sub *nats.Subscription, natsErr error) {
if natsErr == nats.ErrSlowConsumer {
// which subscription is causing the error?
}
)
adding the Id property would allow us to identify the subscription in the handler:
Proposed change
Add an additional property to allow identification of individual subscriptions e.g.
Use case
I have an admittedly special case where multiple subscriptions subscribe to the same subject in the same application. In case of a slow subscriber, it's currently hard to figure out exactly which subscription is causing the error:
in the error callback only the subject and queue are available:
adding the Id property would allow us to identify the subscription in the handler:
Contribution
Yes, seems a straightforward implementation.