使用Java工具的类似Sidekiq的队列

使用Java工具的类似Sidekiq的队列

本文介绍了使用Java工具的类似Sidekiq的队列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有一个工作队列,其行为几乎与ruby的sidekiq完全一样(不需要 使用Redis,但可以-我就是不能使用ruby-甚至Jruby也不行) .基本上,我希望能够创建使用某些参数运行的作业,并由工作池执行这些作业.工人们将使用休眠来完成一些工作,因此我认为Spring集成可以使事情变得更容易.

I want to have a work queue that behaves almost exactly like ruby's sidekiq(it doesn't need to use Redis, but it can - I just can't use ruby - not even Jruby). Basically I want to be able to create jobs that runs with some parameters and a worker pool executes the jobs. The workers are going to use hibernate to do some work, so I think that Spring integration could make things easier.

推荐答案

Spring Integration具有 Redis排队入站和出站通道适配器.

Spring Integration has Redis Queue inbound and outbound channel adapters.

入站消息驱动的适配器当前不支持并发;我们在Spring XD中使用复合适配器解决了这个问题,该复合适配器包装了RedisQueueMessageDrivenEndpoint的集合.

The inbound message-driven adapter doesn't currently support concurrency; we worked around that in Spring XD with a composite adapter that wraps a collection of RedisQueueMessageDrivenEndpoint.

或者您可以使用RabbitMQ; Spring Integration适配器确实支持并发.

Or you could use RabbitMQ; the Spring Integration adapter for it does support concurrency.

编辑

公交车被提取到子项目在该仓库中.

这篇关于使用Java工具的类似Sidekiq的队列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 07:22