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 theNOACK
flag when reading in the context of a consumer group.Use a blocking read and supply thetimeout
after which the call will terminate if no message was read.count
(long count) Limit the number of messages returned per stream.static StreamReadOptions
empty()
Creates an emptyStreamReadOptions
instance.boolean
getBlock()
getCount()
int
hashCode()
boolean
boolean
isNoack()
noack()
Enable auto-acknowledgement by setting theNOACK
flag when reading in the context of a consumer group.toString()
-
Method Details
-
empty
Creates an emptyStreamReadOptions
instance.- Returns:
- an empty
StreamReadOptions
instance.
-
noack
Enable auto-acknowledgement by setting theNOACK
flag when reading in the context of a consumer group. This method is an alias forautoAcknowledge()
for readability reasons.- Returns:
StreamReadOptions
withnoack
applied.
-
autoAcknowledge
Enable auto-acknowledgement by setting theNOACK
flag when reading in the context of a consumer group. This method is an alias fornoack()
for readability reasons.- Returns:
- new instance of
StreamReadOptions
withnoack
applied. - Since:
- 2.3
-
block
Use a blocking read and supply thetimeout
after 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
StreamReadOptions
withblock
applied.
-
count
Limit the number of messages returned per stream.- Parameters:
count
- the maximum number of messages to read.- Returns:
StreamReadOptions
withcount
applied.
-
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()
-