@@ -1151,29 +1151,47 @@ The Redis transport DSN may looks like this:
11511151
11521152 The Unix socket DSN was introduced in Symfony 5.1.
11531153
1154- The transport has a number of options:
1154+ To use the Redis transport, you will need the Redis PHP extension (>=4.3) and
1155+ a running Redis server (^5.0).
1156+
1157+ A number of options can be configured via the DSN or via the ``options `` key
1158+ under the transport in ``messenger.yaml ``:
11551159
1156- =================== ===================================== =========================
1160+ =================== ===================================== =================================
11571161 Option Description Default
1158- =================== ===================================== =========================
1159- stream The Redis stream name messages
1160- group The Redis consumer group name symfony
1161- consumer Consumer name used in Redis consumer
1162- auto_setup Create the Redis group automatically? true
1163- auth The Redis password
1164- delete_after_ack If ``true ``, messages are deleted false
1165- automatically after processing them
1166- delete_after_reject If ``true ``, messages are deleted true
1167- automatically if they are rejected
1168- serializer How to serialize the final payload ``Redis::SERIALIZER_PHP ``
1169- in Redis (the
1170- ``Redis::OPT_SERIALIZER `` option)
1171- stream_max_entries The maximum number of entries which ``0 `` (which means "no trimming")
1172- the stream will be trimmed to. Set
1173- it to a large enough number to
1174- avoid losing pending messages
1175- tls Enable TLS support for the connection false
1176- =================== ===================================== =========================
1162+ =================== ===================================== =================================
1163+ stream The Redis stream name messages
1164+ group The Redis consumer group name symfony
1165+ consumer Consumer name used in Redis consumer
1166+ auto_setup Create the Redis group automatically? true
1167+ auth The Redis password
1168+ delete_after_ack If ``true ``, messages are deleted false
1169+ automatically after processing them
1170+ serializer How to serialize the final payload ``Redis::SERIALIZER_PHP ``
1171+ in Redis (the
1172+ ``Redis::OPT_SERIALIZER `` option)
1173+ stream_max_entries The maximum number of entries which ``0 `` (which means "no trimming")
1174+ the stream will be trimmed to. Set
1175+ it to a large enough number to
1176+ avoid losing pending messages
1177+ tls Enable TLS support for the connection false
1178+ redeliver_timeout Timeout before retrying a pending ``3600 ``
1179+ message which is owned by an
1180+ abandoned consumer (if a worker died
1181+ for some reason, this will occur,
1182+ eventually you should retry the
1183+ message) - in seconds.
1184+ claim_interval Interval on which pending/abandoned ``60000 `` (1 Minute)
1185+ messages should be checked for to
1186+ claim - in milliseconds
1187+ =================== ===================================== =================================
1188+
1189+ .. caution ::
1190+
1191+ There should never be more than one ``messenger:consume `` command running with the same
1192+ config (stream, group and consumer name) to avoid having a message handled more than once.
1193+ Using the ``HOSTNAME `` as the consumer might often be a good idea. In case you are using
1194+ Kubernetes to orchestrate your containers, consider using a ``StatefulSet ``.
11771195
11781196.. tip ::
11791197
@@ -1184,7 +1202,8 @@ tls Enable TLS support for the connection false
11841202
11851203.. versionadded :: 5.1
11861204
1187- The ``delete_after_ack `` option was introduced in Symfony 5.1.
1205+ The ``delete_after_ack ``, ``redeliver_timeout `` and ``claim_interval ``
1206+ options were introduced in Symfony 5.1.
11881207
11891208.. versionadded :: 5.2
11901209
0 commit comments