JMS是 API ActiveMQ 实现的,是 Java 企业应用程序的重要基石。这使得消息共享相当通用的格式和语义,这使得不同应用程序之间的集成更加容易。
Of course, there are a lot of more detailed features that are only in ActiveMQ, wire protocols like OpenWire, STOMP and MQTT, JMS, EIP together with Apache Camel, message patterns like "request/reply" and "publish/subscribe", JMS Bridging, clustering ("network of brokers"), which allow scaling and distributions, etc.
如果你对这些主题感兴趣,你应该多读一点,因为它们相当大。
是的,您可以将消息存储在 数据库中,以便在两个进程之间进行通信,但是,一旦收到消息,您就必须将消息 DELETE,即 这意味着每条消息都有一行 ABC1和 DELETE。
When you try to 规模 that up communicating thousands of messages per second, 数据库容易崩溃.
Apache ActiveMQ is an open source message broker written in Java together with a full Java Message Service (JMS) client. It provides "Enterprise Features" which in this case means fostering the communication from more than one client or server
Reliable Communication : Consider a system that process client requests. In normal cases the system receives 100 requests per minute. This system is unreliable when number of request goes beyond average. In such case Queue can manage requests and it can push messages periodically based on system throughput without breaking it.
基于队列的系统的数据库
在这种情况下,可以考虑为 PDF 作业行使用数据库。通常,您会创建一个数据库表,其中包含一行与 PDF 需求对话的记录。在这一点上,您可以在表中放置一个冰雹,以说明任务处于哪种状态,以及任务是否已完成。
INSERT INTO pdf_job_queue (name, status, email) VALUES ("White paper", "NEW", "myemail@example.com");
SELECT * FROM pdf_job_queue WHERE queue = 'resize_queue' AND handled = false ORDER BY date_recived limit 1;