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 Summary
Modifier 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
-
empty
Creates an emptyStreamReadOptionsinstance.- Returns:
- an empty
StreamReadOptionsinstance.
-
noack
Enable auto-acknowledgement by setting theNOACKflag when reading in the context of a consumer group. This method is an alias forautoAcknowledge()for readability reasons.- Returns:
StreamReadOptionswithnoackapplied.
-
autoAcknowledge
Enable 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
-
block
Use 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.
-
count
Limit the number of messages returned per stream.- Parameters:
count- the maximum number of messages to read.- Returns:
StreamReadOptionswithcountapplied.
-
isBlocking
public boolean isBlocking()- Returns:
- true if the arguments indicate a blocking read.
- Since:
- 2.3
-
getBlock
-
getCount
-
isNoack
public boolean isNoack() -
toString
-
equals
-
hashCode
public int hashCode()
-