Skip to content
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

Connection showing one only of multiple sentinel servers defined #2248

Open
dan-developer opened this issue Feb 20, 2025 · 0 comments
Open

Comments

@dan-developer
Copy link

dan-developer commented Feb 20, 2025

  • Python 3.12.9
  • Celery 5.3.1
  • Kombu 5.3.2

When I configure multiple sentinels to celery broker, when celery starts show only one of this sentinels.

I configured following documentation: https://docs.celeryq.dev/projects/kombu/en/stable/userguide/connections.html#urls

So, I did an example code to test:

      with Connection('sentinel://0.0.0.0:26347/3;sentinel://0.0.0.0:26348/3') as conn:
          print(conn.as_uri())

This output the following: sentinel://0.0.0.0:26347/3
And not show the another two sentinels defined.

Trying with another option, in this case, amqp:

      with Connection('amqp://foo;amqp://bar') as conn:
          print(conn.as_uri())

This output the following: amqp://guest:**@foo:5672//
And not show the another two amqp defined.

I've read the kombu code to make sure that I thinking correctly:

class SentinelChannel(Channel):
    """Channel with explicit Redis Sentinel knowledge.

    Broker url is supposed to look like:

    .. code-block::

        sentinel://0.0.0.0:26379;sentinel://0.0.0.0:26380/...

    where each sentinel is separated by a `;`.

    Other arguments for the sentinel should come from the transport options
    (see `transport_options` of :class:`~kombu.connection.Connection`).

    You must provide at least one option in Transport options:
     * `master_name` - name of the redis group to poll

    Example:
    -------
    .. code-block:: python

        >>> import kombu
        >>> c = kombu.Connection(
             'sentinel://sentinel1:26379;sentinel://sentinel2:26379',
             transport_options={'master_name': 'mymaster'}
        )
        >>> c.connect()
    """

Could you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant