是否有可能将芹菜与卡夫卡融为一体

时间:2017-08-21 09:38:53

标签: apache-kafka celery

我想在使用celery的代码中引入多处理。 但目前我的队列实施在Kafka。

目前芹菜网站仅提及这4家经纪人: http://docs.celeryproject.org/en/master/getting-started/brokers/index.html#broker-overview

是否可以将Celery与Kafka集成,类似于下面提到的RabbitMQ:

from celery import Celery
app = Celery('tasks', broker='pyamqp://guest@localhost//')
@app.task
def add(x, y):
    return x + y

2 个答案:

答案 0 :(得分:3)

讨论过将卡夫卡作为芹菜的经纪人,并且有部分实施。我希望这可以帮助你

https://github.com/celery/kombu/issues/301

看起来它将于10月31日左右上市。

https://github.com/celery/kombu/milestone/2

答案 1 :(得分:2)

当您正在为 Kafka 寻找多处理解决方案时,我建议您查看 Faust 库。

这是一个与芹菜比较的例子(非常接近你的):

https://faust.readthedocs.io/en/latest/playbooks/vscelery.html

%[^\n]

《浮士德》的创造者之一是芹菜的作者。

我这么说是因为此时距离@user3382968提到的票证创建已经过去了7年,仍然没有进展。

相关问题