How to call a celery task delay function from non-python languages such as Java?

大城市里の小女人 提交于 2019-12-03 14:31:58

There were couple of issues.

1) String queueName = channel.queueDeclare().getQueue() command was returning wrong queue name. I changed the queuename to "celery" and it worked fine. 2) The format of json has to be of this type:- {"id": "4cc7438e-afd4-4f8f-a2f3-f46567e7ca77", "task": "celery.task.PingTask", "args": [], "kwargs": {}, "retries": 0, "eta": "2009-11-17T12:30:56.527191"}

as seen in http://docs.celeryproject.org/en/latest/internals/protocol.html

It worked fine after these two changes.

-Amit

Guy Gavriely

celery implicitly declare an exchange, using Java you'll have to declare one yourself.

see Interoperating with Django/Celery From Java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!