What's the equivalent of Python's Celery p

2020-02-16 08:21发布

I am trying to find an equivalent of Celery project for Java environment, I have looked at Spring Batch, but are there any better alternatives for distributed task queues.

Thanks.

8条回答
干净又极端
2楼-- · 2020-02-16 08:41

Quartz has worked for me in the past. It's integrated with Terracotta now, so it should be easy to distribute. http://quartz-scheduler.org/

查看更多
你好瞎i
3楼-- · 2020-02-16 08:44

The closest thing I've found is Octobot: https://github.com/cscotta/Octobot Not so much documentation though... there used to be a website for it at octobot.taco.cat, but I haven't seen that load lately. I haven't personally used Octobot, but I've often seen it recommended as a Celery for Java.

查看更多
4楼-- · 2020-02-16 08:45

I haven't been able to find anything as easy to use as Celery for Java. Most of the solutions recommended to use a message queue. But Celery sits one level of abstraction higher than the queue. Instead of messages and consumers, you can think in terms of tasks and workers, results, retries etc.

I also needed to implement some bridge for a company using both Java and Python so I started this project:

celery-java - Celery client and worker in Java, compatible with their Python counterparts.

Beware, it's very immature as of now.

查看更多
太酷不给撩
5楼-- · 2020-02-16 08:52

Celery is primarily based on Erlang/RabbitMQ. RabbitMQ has a Java client library that might be useful. Also, there is octobot which has a RabbitMQ backend.

查看更多
够拽才男人
6楼-- · 2020-02-16 08:53

What Celery is doing is very much akin to EIP, and SEDA with convenient task scheduling... (all you have left to do is add some DB, and async HTTP networking and you have got a complete enterprise quality stack).

Basically in Java there is the Spring way, the Java EE way, and the Hadoop way:

  • Spring: Spring Integration + Spring Batch + RabbitMQ
  • Java EE: Mule + Quartz or EJB Scheduling + HornetMQ
  • Hadoop: Capacity + ZooKeeper

Those are roughly in order of ease of setting up.

查看更多
爷、活的狠高调
7楼-- · 2020-02-16 08:53

Distributed Java tasks scheduling and execution https://redisson.org/

查看更多
登录 后发表回答