Package com.rabbitmq.stream
Interface Consumer
-
- All Superinterfaces:
AutoCloseable
public interface Consumer extends AutoCloseable
API to consume messages from a RabbitMQ Stream.Instances are configured and created with a
ConsumerBuilder.- See Also:
ConsumerBuilder,Environment.consumerBuilder()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the consumer.voidstore(long offset)Store the offset.longstoredOffset()The stored offset for this named consumer on the configured stream.
-
-
-
Method Detail
-
store
void store(long offset)
Store the offset.- Parameters:
offset-
-
close
void close()
Close the consumer.- Specified by:
closein interfaceAutoCloseable
-
storedOffset
long storedOffset()
The stored offset for this named consumer on the configured stream.- Returns:
- stored offset
- Throws:
NoOffsetException- if no offset is stored for this name on the stream- Since:
- 0.6.0
-
-