Quartz Scheduler 和 JMS 有什么区别?
我想知道 Quartz Scheduler 和 JMS 之间有什么区别,以及在什么情况下最好使用这些工具......
I would like know what is the difference between the Quartz Scheduler and JMS, and in what situations is better to do the use of the tools...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
他们是完全不同的。一个是事件调度程序,另一个是消息/队列技术。
They are completely different. One is an event scheduler, the other is a messaging / queuing technology.
Quartz 调度程序基本上是按照调度运行任务。例如,“每周五上午 10 点做 XYZ”。
JMS 涉及在可能运行在不同机器上的不同 Java 程序(客户端)之间可靠地发送、排队和传递消息。
正如您所看到的,它们执行的功能大多不相关。使用提供您实际需要的功能的那个……或者如果您同时需要调度和排队,则两者都使用。
The Quartz scheduler is basically about running tasks in / to a schedule. For example, "do XYZ at 10 am every Friday".
JMS is about reliable sending, queueing and delivery of messages between different Java programs (clients) potentially running on different machines.
As you can see they perform mostly unrelated functions. Use which ever provides the functionality that you actually need ... or both if you need both scheduling and queuing.
Quartz 是一个用于调度作业的库/产品(就像大多数 UNIX 系统上的 cronjobs 一样)。您可以在此处找到使用 Quartz 的一些图解和示例。
另一方面:
Quartz is a library/product for scheduling jobs (just as you cronjobs on most UNIX systems). You can find a little turorial and example of using Quartz here.
On the other hand:
另一个区别是 Quartz 是一种随时可用的产品,而 JMS 只是一种规范(需要您选择一个实现来使用它)。
One other difference is that Quartz is a ready-to-use product, and JMS is only a specification (requires you to select an implementation to use it).