Skip to content

Commit 13d1aba

Browse files
committed
Document committed offset in stream stats
1 parent a1b686d commit 13d1aba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/com/rabbitmq/stream/StreamStats.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,25 @@ public interface StreamStats {
4141
* given time. The value can be stale as soon as the application reads it though, as the committed
4242
* chunk ID for a stream that is published to changes all the time.
4343
*
44+
* <p>Use {@link #committedChunkId()} instead if the last offset in the stream is needed.
45+
*
4446
* @return committed offset in this stream
4547
* @see Context#committedChunkId()
48+
* @see #committedOffset()
4649
* @throws NoOffsetException if there is no committed chunk yet
4750
*/
4851
long committedChunkId();
4952

53+
/**
54+
* The offset of the last committed message in the stream.
55+
*
56+
* <p>The value can be stale as soon as the application reads it though, as the last committed
57+
* offset for a stream that is published to changes all the time.
58+
*
59+
* <p>Requires RabbitMQ 4.3 or more.
60+
*
61+
* @return last committed offset
62+
* @throws NoOffsetException if there is no committed message yet or if the value is not available
63+
*/
5064
long committedOffset();
5165
}

0 commit comments

Comments
 (0)