Skip to content

Multiple host broker url format for ZooKeeper #734

@koorgoo

Description

@koorgoo

There is a difference in how celery and kazoo (ZooKeeper driver for kombu used by celery) accept multiple hosts.

On the one side, celery suggests a semicolon separated URL list format.

CELERY_BROKER_URL = 'amqp://foo;amqp://bar'  # Django example.

On the other side, kazoo accepts a string with comma separated list of hosts.

KazooClient(hosts='localhost:2181,localhost:2182')

The issue with ZooKeeper fault tolerant configuration is that when configuring several hosts you must provide the same chroot (some kind of offset to store keys in ZooKeeper).

There are a few options how to provide the same chroot. Please, help me to choose one to implement:

Option 1: Kombu supports special format of URL for ZooKeeper close to kazoo API.

zookeeper://<host>[:<port>][,<host>[:<port>]][/<chroot>]

Option 2: Kombu demands same chroots in every sub-URL:

zookeeper://<host>[:<port>][/<chroot>][;zookeeper://<host>[:<port>][/<chroot>]]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions