Skip to content

Commit a75f771

Browse files
weltekialexellis
authored andcommitted
Add maxWaiting parameter for jetstream-queue-worker
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent ace0728 commit a75f771

File tree

6 files changed

+16
-0
lines changed

6 files changed

+16
-0
lines changed

chart/openfaas/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ yaml) |
508508
| ----------------------- | ---------------------------------- | ---------------------------------------------------------- |
509509
| `jetstreamQueueWorker.durableName` | Durable name used by JetStream consumers | `faas-workers` |
510510
| `jetstreamQueueWorker.image` | Container image used for the queue-worker when the `queueMode` is `jetstream` | See [values.yaml](./values.yaml) |
511+
| `jetstreamQueueWorker.maxWaiting` | Configure the max waiting pulls for the queue-worker JetStream consumer. The value should be at least max_inflight * queue_worker.replicas. Note that this value can not be updated once the consumer is created. | `512` |
511512
| `jetstreamQueueWorker.logs.debug` | Log debug messages | `false` |
512513
| `jetstreamQueueWorker.logs.format` | Set the log format, supports `console` or `json` | `console` |
513514
| `nats.channel` | The name of the NATS Streaming channel or NATS JetStream stream to use for asynchronous function invocations | `faas-request` |

chart/openfaas/templates/jetstream-queueworker-dep.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ spec:
6262
value: "{{ .Values.queueWorker.ackWait }}"
6363
- name: max_inflight
6464
value: "{{ .Values.queueWorkerPro.maxInflight }}"
65+
- name: max_waiting
66+
value: "{{ .Values.jetstreamQueueWorker.maxWaiting }}"
6567
- name: "debug"
6668
value: "{{ .Values.jetstreamQueueWorker.logs.debug }}"
6769
- name: "log_encoding"

chart/openfaas/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ operator:
184184
jetstreamQueueWorker:
185185
image: ghcr.io/openfaasltd/jetstream-queue-worker:0.3.6
186186
durableName: "faas-workers"
187+
# Configure the max waiting pulls for the queue-worker JetStream consumer.
188+
# The value should be at least max_inflight * replicas.
189+
# Note that this value can not be updated once the consumer is created.
190+
maxWaiting: 512
187191
logs:
188192
debug: false
189193
format: "console"

chart/queue-worker/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ helm upgrade slow-queue chart/queue-worker \
3333
|-----------|-------------|---------|
3434
| `image` | The jetstream-queue-worker image that should be deployed | See values.yaml |
3535
| `replicas` | Number of queue-worker replicas to create | `1` |
36+
| `maxInflight` | Control the concurrent invocations | `1` |
37+
| `maxWaiting` | Configure the max waiting pulls for the queue-worker JetStream consumer. The value should be at least max_inflight * queue_worker.replicas. Note that this value can not be updated once the consumer is created. | `512` |
3638
| `upstreamTimeout` | Maximum duration of upstream function call | `1m` |
3739
| `maxRetryAttempts` | The amount of times to try sending a message to a function before discarding it |`10` |
3840
| `maxRetryWait` | The maximum amount of time to wait between retries | `120s` |

chart/queue-worker/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ spec:
5757
value: "{{ .Values.gateway.host }}:{{ .Values.gateway.port }}"
5858
- name: "max_inflight"
5959
value: "{{ .Values.maxInflight }}"
60+
- name: max_waiting
61+
value: "{{ .Values.maxWaiting }}"
6062
- name: "upstream_timeout"
6163
value: "{{ .Values.upstreamTimeout }}"
6264
- name: "tls_insecure"

chart/queue-worker/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ replicas: 1
44

55
maxInflight: 1
66

7+
# Configure the max waiting pulls for the queue-worker JetStream consumer.
8+
# The value should be at least max_inflight * replicas.
9+
# Note that this value can not be updated once the consumer is created.
10+
maxWaiting: 512
11+
712
upstreamTimeout: "1m"
813

914
maxRetryAttempts: "10"

0 commit comments

Comments
 (0)