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

Question: Celery rabbitmq connection friendly name #1252

Closed
aravindrp opened this issue Sep 23, 2020 · 1 comment
Closed

Question: Celery rabbitmq connection friendly name #1252

aravindrp opened this issue Sep 23, 2020 · 1 comment

Comments

@aravindrp
Copy link

When using celery with RabbitMQ how can we give connection friendly names? I was able to do this in pika following the below issue ticket.

pika/pika#989

How can we do this in celery as it uses kombu?

@aravindrp aravindrp changed the title Celery rabbitmq connection friendly name Question: Celery rabbitmq connection friendly name Sep 23, 2020
@matusvalo
Copy link
Member

matusvalo commented Sep 24, 2020

The connection_name parameter is passed via client_properties. In py-amqp this is done as follows:

>>> import amqp
>>> c = amqp.Connection('broker.example.com', client_properties={'connection_name': 'foo'})
>>> c.connect()

For kombu it is simpy, just pass the client_properties to py-amqp driver using transport_options:

>>> import kombu
>>> c = kombu.Connection('amqp://broker.example.com', transport_options={'client_properties': {'connection_name': 'foo'}})
>>> c.connect()

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

2 participants