Hi Scott, If it is not too much trouble, can I please extend my question to below-
I am new to jetstream and I am working on creating a DLQ. The client who will subscribe will come every 10 days(let's say) to read messages from DLQ and it should be durable. So I have three requirements , which I have currently handled in below way-To be able to subscribe to DLQ (Durable and must have a worker queue)For this I have created a push based consumer, with below conf and I do a queueSubscribe with some queueName.
config := SubscribeOptions{
DeliverAllAvailable: true,
IsManualAck: true,
IsPushBound: true,
DurableName: subject,
}
Also once a message is retried 3 times ,I send a msg.NakWithDelay(time.Duration(10) * time.Minute)To be able to read all unacked messages from DLQFor this also,I have done exactly like above ,same conf(same consumer), part of same workerqueue but for all messages I get I send a msg.NakWithDelay(time.Duration(2) * time.Minute)Get count of messages subject wise in DLQ.I use GetStreamInfo() , but here when i get the count subject wise, it give count of all messages subject wise, can i get count of all unacked messages someway.So I have three questions here -
Can this be done in a better way.
Also sending Nack and it constantly trying to redeliver messages for lets say 10 days, will it be resource intensive?
Better way to get count of unacked messages subject wise?
Thankyou!