What is the relationship between activemq and jms? activemqjms
JMS is a technical specification used to provide message services. It develops all data structures and interaction processes throughout the message service provision process.
Activemq is a Message Queue Service, the final implementation of message-oriented middleware (MOM), and a real service provider.
A standard or protocol of jms.
It is usually used for message transmission for enterprise-level applications.
There are mainly topic messages (one-to-many) and queue messages (one-to-one ).
Activemq is a jms implementation developed by apache.
MQ features:
A typical example of the MQ consumption-producer model is that one end continuously writes messages to the message queue, while the other end can read or subscribe to messages in the queue.
MQ is similar to JMS,But the difference is that JMS is a standard and API definition of sun java Message Middleware service.,MQ follows the specific implementation and product of AMQP protocol.
Use Cases:
In the project, some operations that do not require immediate return and time-consuming are extracted for asynchronous processing. This asynchronous processing method greatly saves the server's request response time, this improves the system throughput.
JMS introduction:
JMS is the Java Message Service application interface. It is an API for Message-oriented middleware (MOM) on the Java platform.
It is used to send messages between two applications or distributed systems for asynchronous communication.
Java Message Service is an API unrelated to a specific platform. Most MOM providers provide support for JMS.
Definition:
Java Messaging Service (JMS) is a technical specification for message-oriented middleware (MOM) on the Java platform. It facilitates message exchange between Java applications in the message system, in addition, it simplifies the development of enterprise applications by providing standard interfaces for generating, sending, and receiving messages and translates them into Java Message Services.
Introduction:
JMS is a vendor-independent API,Used to access the message sending and receiving system messages.
It is similar to JDBC (Java DatabaseConnectivity): Here, JDBC is an API that can be used to access many different relational databases, while JMS provides access methods that are also independent of the vendor to access the message sending and receiving service.
Many vendors currently support JMS, including IBM MQSeries, BEA's Weblogic JMS service, and Progress's SonicMQ. These are just a few examples.
JMS enables you to send messages from one JMS client to another through the message sending and receiving service (sometimes called a message intermediary program or router.
A message is a type object in JMS. It consists of a header and a message body.
The header consists of route information and metadata about the message. The message body carries the data or load of the application.
Based on the type of the payload, messages can be divided into several types, which carry:
Simple text (TextMessage), serializable object (ObjectMessage), property set (MapMessage), BytesMessage, and original value stream (StreamMessage ), there is also a Message without a payload ).
Relationship between JMS and MQ:
JMS is a technical specification used to provide message services. It develops all data structures and interaction processes throughout the message service provision process.
MQ is a Message Queue Service. It is the final implementation of message-oriented middleware (MOM) and a real service provider. MQ can be implemented based on JMS or other specifications or standards.
Open source MQ supporting JMS:
ActiveMQ is the most selected currently.
ActiveMQ is the most popular and powerful open-source message bus produced by Apache.
ActiveMQ is a JMS Provider that fully supports the JMS1.1 and J2EE 1.4 specifications. Although it has been a long time since the JMS specifications were introduced, however, JMS still plays a special role in today's J2EE applications.
Main features:
1. Write clients in multiple languages and protocols. Languages: Java, C, C ++, C #, Ruby, Perl, Python, and PHP. Application Protocol: OpenWire, Stomp REST, WSNotification, XMPP, AMQP;
2. Fully supports JMS1.1 and J2EE 1.4 specifications (persistence, XA messages, transactions );
3. For Spring support, ActiveMQ can be easily embedded into the system using Spring, and also support Spring features;
4. we have passed tests on common J2EE servers (such as Geronimo, JBoss 4, GlassFish, and WebLogic), and configured JCA 1.5 resource adaptors, activeMQ can be automatically deployed on any commercial server compatible with J2EE 1.4;
5. Support multiple transfer protocols: in-VM, TCP, SSL, NIO, UDP, JGroups, JXTA;
6. support high-speed message persistence through JDBC and journal;
7. The design ensures high-performance clusters, client-server, and point-to-point;
8. Supports Ajax;
9. Support integration with Axis;
10. You can easily call the embedded JMS provider for testing;
11. ActiveMQ is very fast. It is generally 10 times faster than jbossMQ.
Advantages:
Is a fast open-source messaging component (framework) that supports clusters, equivalent networks, automatic detection, TCP, SSL, broadcast, persistence, XA, and seamless integration with J2EE1.4 containers, it also supports lightweight containers and Java virtual machines on most cross-language clients.
Asynchronous Message acceptance reduces coupling between software and multi-system integration.
Reliable message reception ensures reliable message storage in middleware, and multiple messages can also form atomic transactions.
Disadvantages:
ActiveMQ's default configuration features low performance and requires configuration optimization. However, the configuration file is complex and ActiveMQ does not provide management tools;
There are few sample codes. The documents on the home page seem comprehensive, but there is a lack of an effective way to organize the documents. The documents only contain fragments, so it is difficult for users to understand them from a simple perspective,
The overall professionalism of the document is too strong. In the research phase, you can check maillist, Javadoc, and analyze the source code.