Class RedisBuilder
Fluent builder for Redis endpoint URIs.
public sealed class RedisBuilder
Inheritance
Methods
AckMode(AckMode)
When a group consumer settles a stream entry: after the route succeeded (,
public RedisBuilder AckMode(AckMode mode)
Batching()
Stream batch mode (batching=true): the route gets the entries as a List<IMessage>.
public RedisBuilder Batching()
BatchingIntervalMs(int)
Batch mode: the hard limit in milliseconds since a batch's first entry (batchingIntervalMs).
public RedisBuilder BatchingIntervalMs(int ms)
Connection(IExpression)
Redis connection string. Default "localhost:6379".
public RedisBuilder Connection(IExpression connectionString)
Connection(string)
Redis connection string (template string, supports ${...}). Default "localhost:6379".
public RedisBuilder Connection(string connectionString)
ConnectionFactory(IExpression)
Use a named connection factory registered in DI.
public RedisBuilder ConnectionFactory(IExpression name)
ConnectionFactory(string)
Use a named connection factory registered in DI (template string, supports ${...}).
public RedisBuilder ConnectionFactory(string name)
ConsumerGroup(IExpression)
Consumer group name for stream operations.
public RedisBuilder ConsumerGroup(IExpression group)
ConsumerGroup(string)
Consumer group name for stream operations (template string, supports ${...}).
public RedisBuilder ConsumerGroup(string group)
ConsumerName(IExpression)
Consumer name within the group.
public RedisBuilder ConsumerName(IExpression name)
ConsumerName(string)
Consumer name within the group (template string, supports ${...}).
public RedisBuilder ConsumerName(string name)
Database(IExpression)
Database number from an expression.
public RedisBuilder Database(IExpression db)
Field(string)
Hash field name (template string, supports ${...}).
public RedisBuilder Field(string field)
GeoUnit(string)
Geo distance unit: m, km, mi, ft. Default "m".
public RedisBuilder GeoUnit(string unit)
MaxBatchMessages(int)
Largest number of entries in a batch (maxBatchMessages, default streamReadCount).
public RedisBuilder MaxBatchMessages(int max)
Member1(string)
First member for geo distance (template string, supports ${...}).
public RedisBuilder Member1(string member)
Member2(string)
Second member for geo distance (template string, supports ${...}).
public RedisBuilder Member2(string member)
Password(string)
Redis password (template string, supports ${...}).
public RedisBuilder Password(string password)
PollDelay(int)
Poll delay for consumer operations in milliseconds. Default 1000.
public RedisBuilder PollDelay(int ms)
PollTimeoutMs(int)
Batch mode: the idle timeout in milliseconds, restarted by every entry (pollTimeoutMs, default 1000).
public RedisBuilder PollTimeoutMs(int ms)
ProcessingList(string)
A BLPOP/BRPOP consumer moves each item into key while its route runs and removes it after
public RedisBuilder ProcessingList(string key)
StreamApproximate(bool)
Approximate MAXLEN trimming. Default true.
public RedisBuilder StreamApproximate(bool approx = true)
StreamBlockTime(IExpression)
Stream block time from an expression.
public RedisBuilder StreamBlockTime(IExpression ms)
StreamBlockTime(int)
Block time in milliseconds for XREAD. Default 1000.
public RedisBuilder StreamBlockTime(int ms)
StreamClaimMinIdle(int)
A group consumer claims entries of its group pending for at least ms milliseconds (a failed
public RedisBuilder StreamClaimMinIdle(int ms)
StreamMaxLength(IExpression)
Max stream length from an expression.
public RedisBuilder StreamMaxLength(IExpression max)
StreamMaxLength(int)
Max stream length (XADD with MAXLEN). Default 0 (unlimited).
public RedisBuilder StreamMaxLength(int max)
StreamReadCount(IExpression)
Stream read count from an expression.
public RedisBuilder StreamReadCount(IExpression count)
StreamReadCount(int)
Number of entries to read per XREAD. Default 10.
public RedisBuilder StreamReadCount(int count)
StreamStartPosition(string)
Where a stream consumer starts: unset, at the entries added from now on; "0" from the beginning; an entry id after
public RedisBuilder StreamStartPosition(string position)
Transacted()
Defers the operation to the commit of the enclosing .Transacted() block (transacted=true).
public RedisBuilder Transacted()
Transacted(bool)
Sets transacted explicitly. false makes PUBLISH and XADD go out at once even inside a
public RedisBuilder Transacted(bool value)
Ttl(int)
TTL for SET operations in seconds. Default 0 (no expiry).
public RedisBuilder Ttl(int seconds)