You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-how-to-functions.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,21 +232,22 @@ public static void PubSubTrigger(
232
232
233
233
:::zone-end
234
234
235
-
### RedisListsTrigger
235
+
### RedisListTrigger
236
236
237
-
The `RedisListsTrigger` pops elements from a list and surfaces those elements to the function. The trigger polls Redis at a configurable fixed interval, and uses [`LPOP`](https://redis.io/commands/lpop/)/[`RPOP`](https://redis.io/commands/rpop/)/[`LMPOP`](https://redis.io/commands/lmpop/) to pop elements from the lists.
237
+
The `RedisListTrigger` pops elements from a list and surfaces those elements to the function. The trigger polls Redis at a configurable fixed interval, and uses [`LPOP`](https://redis.io/commands/lpop/)/[`RPOP`](https://redis.io/commands/rpop/)/[`LMPOP`](https://redis.io/commands/lmpop/) to pop elements from the lists.
238
238
239
-
#### Inputs for RedisListsTrigger
239
+
#### Inputs for RedisListTrigger
240
240
241
-
-`ConnectionString`: connection string to the redis cache, for example`<cacheName>.redis.cache.windows.net:6380,password=...`.
242
-
-`Keys`: Keys to read from, space-delimited.
241
+
-`ConnectionStringSetting`: connection string to the redis cache, for example`<cacheName>.redis.cache.windows.net:6380,password=...`.
242
+
-`Key`: Key or keys to read from, space-delimited.
243
243
- Multiple keys only supported on Redis 7.0+ using [`LMPOP`](https://redis.io/commands/lmpop/).
244
244
- Listens to only the first key given in the argument using [`LPOP`](https://redis.io/commands/lpop/)/[`RPOP`](https://redis.io/commands/rpop/) on Redis versions less than 7.0.
245
+
- This field can be resolved using `INameResolver`
245
246
- (optional) `PollingIntervalInMs`: How often to poll Redis in milliseconds.
246
247
- Default: 1000
247
248
- (optional) `MessagesPerWorker`: How many messages each functions worker "should" process. Used to determine how many workers the function should scale to.
248
249
- Default: 100
249
-
- (optional) `BatchSize`: Number of elements to pull from Redis at one time.
250
+
- (optional) `Count`: Number of elements to pull from Redis at one time. These are processed in parallel.
250
251
- Default: 10
251
252
- Only supported on Redis 6.2+ using the `COUNT` argument in [`LPOP`](https://redis.io/commands/lpop/)/[`RPOP`](https://redis.io/commands/rpop/).
252
253
- (optional) `ListPopFromBeginning`: determines whether to pop elements from the beginning using [`LPOP`](https://redis.io/commands/lpop/) or to pop elements from the end using [`RPOP`](https://redis.io/commands/rpop/).
@@ -257,9 +258,9 @@ The following sample polls the key `listTest` at a localhost Redis instance at `
@@ -311,25 +312,25 @@ public static void ListsTrigger(
311
312
312
313
:::zone-end
313
314
314
-
### RedisStreamsTrigger
315
+
### RedisStreamTrigger
315
316
316
-
The `RedisStreamsTrigger` pops elements from a stream and surfaces those elements to the function.
317
+
The `RedisStreamTrigger` pops elements from a stream and surfaces those elements to the function.
317
318
The trigger polls Redis at a configurable fixed interval, and uses [`XREADGROUP`](https://redis.io/commands/xreadgroup/) to read elements from the stream.
319
+
The consumer group for all function instances will be the ID of the function. For example, for the StreamTrigger function in [this sample](https://github.com/Azure/azure-functions-redis-extension/blob/main/samples/dotnet/RedisSamples.cs), the consumer group would be `Microsoft.Azure.WebJobs.Extensions.Redis.Samples.RedisSamples.StreamTrigger`.
318
320
Each function creates a new random GUID to use as its consumer name within the group to ensure that scaled out instances of the function don't read the same messages from the stream.
319
321
320
-
#### Inputs for RedisStreamsTrigger
322
+
#### Inputs for RedisStreamTrigger
321
323
322
-
-`ConnectionString`: connection string to the redis cache, for example, `<cacheName>.redis.cache.windows.net:6380,password=...`.
323
-
-`Keys`: Keys to read from, space-delimited.
324
+
-`ConnectionStringSetting`: connection string to the redis cache, for example, `<cacheName>.redis.cache.windows.net:6380,password=...`.
325
+
-`Key`: Key or keys to read from, space-delimited.
- This field can be resolved using `INameResolver`.
325
328
- (optional) `PollingIntervalInMs`: How often to poll Redis in milliseconds.
326
329
- Default: 1000
327
330
- (optional) `MessagesPerWorker`: How many messages each functions worker "should" process. Used to determine how many workers the function should scale to.
328
331
- Default: 100
329
-
- (optional) `BatchSize`: Number of elements to pull from Redis at one time.
332
+
- (optional) `Count`: Number of elements to pull from Redis at one time.
330
333
- Default: 10
331
-
- (optional) `ConsumerGroup`: The name of the consumer group that the function uses.
332
-
- Default: "AzureFunctionRedisExtension"
333
334
- (optional) `DeleteAfterProcess`: If the listener will delete the stream entries after the function runs.
334
335
- Default: false
335
336
@@ -338,9 +339,9 @@ The following sample polls the key `streamTest` at a localhost Redis instance at
0 commit comments