Class StreamReadOptions
java.lang.Object
org.springframework.data.redis.connection.stream.StreamReadOptions
Options for reading messages from a Redis Stream.
- Author:
- Mark Paluch, Christoph Strobl, Kaizhou Zhang
- 
Method SummaryModifier and TypeMethodDescriptionEnable auto-acknowledgement by setting theNOACKflag when reading in the context of a consumer group.Use a blocking read and supply thetimeoutafter which the call will terminate if no message was read.count(long count) Limit the number of messages returned per stream.static StreamReadOptionsempty()Creates an emptyStreamReadOptionsinstance.booleangetBlock()getCount()inthashCode()booleanbooleanisNoack()noack()Enable auto-acknowledgement by setting theNOACKflag when reading in the context of a consumer group.toString()
- 
Method Details- 
emptyCreates an emptyStreamReadOptionsinstance.- Returns:
- an empty StreamReadOptionsinstance.
 
- 
noackEnable auto-acknowledgement by setting theNOACKflag when reading in the context of a consumer group. This method is an alias forautoAcknowledge()for readability reasons.- Returns:
- StreamReadOptionswith- noackapplied.
 
- 
autoAcknowledgeEnable auto-acknowledgement by setting theNOACKflag when reading in the context of a consumer group. This method is an alias fornoack()for readability reasons.- Returns:
- new instance of StreamReadOptionswithnoackapplied.
- Since:
- 2.3
 
- 
blockUse a blocking read and supply thetimeoutafter which the call will terminate if no message was read.- Parameters:
- timeout- the timeout for the blocking read, must not be null or negative.
- Returns:
- new instance of StreamReadOptionswithblockapplied.
 
- 
countLimit the number of messages returned per stream.- Parameters:
- count- the maximum number of messages to read.
- Returns:
- StreamReadOptionswith- countapplied.
 
- 
isBlockingpublic boolean isBlocking()- Returns:
- true if the arguments indicate a blocking read.
- Since:
- 2.3
 
- 
getBlock
- 
getCount
- 
isNoackpublic boolean isNoack()
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
 
-