是否可以将芹菜与Kafka整合在一起

是否可以将芹菜与Kafka整合在一起

本文介绍了是否可以将芹菜与Kafka整合在一起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的代码中使用celery引入多处理.但是目前我的队列实现是在Kafka中进行的.

I want to introduce multiprocessing in my code using celery.But currently my queue implementation is in Kafka.

当前celery网站上仅提及以下4个经纪人: http://docs.celeryproject.org/en/master/getting-started/brokers/index.html#broker-overview

Currently celery website mentions of only these 4 brokers:http://docs.celeryproject.org/en/master/getting-started/brokers/index.html#broker-overview

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

Is it possible to integrate Celery with Kafka something similar to RabbitMQ mentioned below:

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

推荐答案

有关于将kafka用作芹菜经纪人的讨论,并且有部分实现.希望对您有帮助

There was discussion on having kafka as broker for celery, And there is a partial implementation of it. I hope this helps you

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

它似乎将于10月31日左右上市.

Looks like it will be available this Oct 31 or so.

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

这篇关于是否可以将芹菜与Kafka整合在一起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 03:30