-
After starting multiple producers/consumers which publish with different subjects on the same jetstream I do not see the number of deleted messages in nats-box. As you can see from the following screenshot the stream size is ca. 600k messages, which is ok as expected and also the number of total sent messages is more than 43,6Mil which is also correct. But I would expect too se under deleted messages not 0 but something around 43Mil, which I don't see. When I started another java project with multiple producers/consumers I was able to see the number of deleted messages but this time not any more. Should this parameter in nats-box show the number of deleted messages or am I wrong, because I couldn't find something in this regard? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 37 replies
-
Imagine you have a stream with messages 1,2,3,4,5,6,7,8,9,10 the stream removes messages due to limits so you have 5,6,7,8,9,10 this would not be reported as deleted messages. If however you now delete using the delete API message 8, you would have 1 deleted message. If you deleted message 5 you would still have 1 deleted message reported. So its about the definition of deleted messages - they are gaps in the stream if you had 5,6,7,|gap|,10 the gap is 2 big so deleted is 2. |
Beta Was this translation helpful? Give feedback.
-
Also when I run gaps command on stream, it throws me this error
|
Beta Was this translation helpful? Give feedback.
Imagine you have a stream with messages 1,2,3,4,5,6,7,8,9,10 the stream removes messages due to limits so you have 5,6,7,8,9,10 this would not be reported as deleted messages.
If however you now delete using the delete API message 8, you would have 1 deleted message. If you deleted message 5 you would still have 1 deleted message reported.
So its about the definition of deleted messages - they are gaps in the stream if you had 5,6,7,|gap|,10 the gap is 2 big so deleted is 2.