Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added redeliver_timeout and claim_interval options #12976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions 24 messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,9 @@ a running Redis server (^5.0).
A number of options can be configured via the DSN or via the ``options`` key
under the transport in ``messenger.yaml``:

================== ===================================== =========================
Option Description Default
================== ===================================== =========================
=================== ===================================== =================================
Option Description Default
=================== ===================================== =================================
stream The Redis stream name messages
group The Redis consumer group name symfony
consumer Consumer name used in Redis consumer
Expand All @@ -1056,7 +1056,23 @@ stream_max_entries The maximum number of entries which ``0`` (which means "n
it to a large enough number to
avoid losing pending messages
tls Enable TLS support for the connection false
================== ===================================== =========================
redeliver_timeout Timeout before retrying a pending ``3600``
message which is owned by an
abandoned consumer (if a worker died
for some reason, this will occur,
eventually you should retry the
message) - in seconds.
claim_interval Interval on which pending/abandoned ``60000`` (1 Minute)
messages should be checked for to
claim - in milliseconds
=================== ===================================== =================================

.. caution::

There should never be more than one `messenger:consume` command running with the same
config (stream, group and consumer name) to avoid having a message handled more than once.
Using the ``HOSTNAME`` as the consumer might often be a good idea. In case you are using
Kubernetes to orchestrate your containers, consider using a ``StatefulSet``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is what @Toflar wanted to document in #11869. ping @Toflar anything you want to add here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, with this PR it's not really relevant anymore. You can use a regular Deployment which changes hostnames after restarts but the PR is here to fix exactly that. The StatefulSet is just so that you always get the same hostnames back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah thats correct still think its good to have the hostname which doesn't change as it avoids spaming redis with new consumers as they recommend to reuse consumer names.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then that should probably be mentioned here but other than that, there's nothing to add regarding k8s :)


.. tip::

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.