-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
confluent_kafka #1647
Comments
Hey @VDneprovskij 👋, We also offer priority support for our sponsors. |
Hi @VDneprovskij if you're still using Kafka with Kombu, I am adding documentation in celery/celery#8935. Would you be willing to a.) help fill in the blanks in terms of how to authenticate using |
@VDneprovskij upon closer inspection of the options in the transport file, I think maybe the username and password needs to be in the broker string? I'll update if I can get that to work. |
It actually looks like it needs to be in the kafka_admin_config = {
"sasl.username": sasl_username,
"sasl.password": sasl_password,
} |
This is working for me, but it might be able to be trimmed down: import os
task_serializer = 'json'
broker_transport_options = {
# "allow_create_topics": True,
}
broker_connection_retry_on_startup = True
# For using SQLAlchemy as the backend
# result_backend = 'db+postgresql://postgres:example@localhost/postgres'
broker_transport_options.update({
"security_protocol": "SASL_SSL",
"sasl_mechanism": "SCRAM-SHA-512",
})
sasl_username = os.environ["SASL_USERNAME"]
sasl_password = os.environ["SASL_PASSWORD"]
broker_url = f"confluentkafka://{sasl_username}:{sasl_password}@broker:9094"
kafka_admin_config = {
"sasl.username": sasl_username,
"sasl.password": sasl_password,
}
kafka_common_config = {
"sasl.username": sasl_username,
"sasl.password": sasl_password,
"security.protocol": "SASL_SSL",
"sasl.mechanism": "SCRAM-SHA-512",
"bootstrap_servers": "broker:9094",
} |
Can this issue be closed? |
Yes, unfortunately I needed a solution a year ago, at that time I simply used another library to solve my problem. |
how to use confluent_kafka? I didn't see the solution in the examples or tests.
Now i use:
with Connection('confluentkafka://localhost:9092') as conn
- its worked. But how i can create Consumer and pass parametrs (group.id, sasl.mechanism and others).Now I'm trying to follow the analogy, but it doesn't work.
The text was updated successfully, but these errors were encountered: