We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
我建议您再看一下 ActiveMQ。虽然它默认是一个独立的应用程序,但您也可以将其嵌入到您的应用程序中,使其成为“独立的”。我已经使用 ActiveMQ 的 Spring 支持 完成了此操作,但您也可以通过简单地以编程方式完成此操作在您的应用程序中实例化正确的类。 ActiveMQ 是轻量级的,并提供多种持久性机制。
关于将“消息”视为“工作”是否存在不一致,我想这取决于你所说的“工作”是什么意思。如果我递给你一张纸,上面写着“修剪草坪”,而你认为这是一份工作,那么消息就可以是工作。相反,如果你在真正开始修剪草坪之前没有工作,那么他们就没有工作。
也许您可能想看看 Spring Batch,它使用 基于作业的域模型。它也是可嵌入的,并且内置持久性、重试等功能。
I recommend you take another look at ActiveMQ. While it is by default a standalone application, you can also embed it in your application, making it "self-contained". I've done this using ActiveMQ's Spring support but you can also do it programmatically by simply instantiating the correct classes in your app. ActiveMQ is lightweight and offers several persistence mechanisms.
Regarding whether there is a dissonance with thinking of "messages" as "jobs", I guess it depends on what you mean by "job". If I hand you a piece of paper that says "mow the lawn" and you think of that as a job, then messages can be jobs. If instead you don't have a job until you actually start mowing the lawn, then they are not.
Perhaps you may want to look at Spring Batch, which uses a job-based domain model. It too is embeddable and has persistence, retry, etc. built in.