JMS and ACTIVEMQ

Source: Internet
Author: User

JMS is a technical specification for providing a messaging service that develops all the data structures and interaction processes throughout the messaging service delivery process. ACTIVEMQ, the Message Queuing service, is the ultimate implementation of message-oriented middleware (MOM) and is a true service provider.

One of the standards of JMS is, or is, a protocol. Messaging is typically used for enterprise-level applications. There are mainly topic messages (1 to many), queue messages (1 to 1). ACTIVEMQ is a JMS implementation, Apache out of.
There are other implementations of JBoss.

Introduction to MQ:
MQ is all called the message queue, and Message Queuing (MQ) is an application-to-application communication method. Applications communicate by writing and retrieving data (messages) for applications that enter and leave the queue, without requiring a private connection to link them. Message passing refers to the process of communicating between programs by sending data in a message, rather than by directly invoking each other, and directly invoking techniques such as remote procedure calls. Queuing refers to an application communicating through a queue. The use of queues removes the requirement that both the receiving and sending applications execute concurrently. One of the more mature MQ products is Ibmwebsphere MQ.
MQ Features:
A typical representation of MQ's consumption-producer model, where one end writes messages continuously to the message queue, while the other end reads or subscribes to messages in the queue. MQ is similar to JMS, but the difference is that JMS is a standard and API definition for the Sun Java Messaging Middleware Service, and MQ follows the specific implementations and products of the AMQP protocol.
Usage scenarios:
In the project, some operations without immediate return and time-consuming are extracted and processed asynchronously, which greatly saves the request response time of the server and improves the throughput of the system.
Introduction to JMS:
The JMS-Java Message Service Application interface is an API for message-oriented middleware (MOM) in the Java platform for sending messages between two applications, or distributed systems, for asynchronous communication. The Java Messaging Service is a platform-agnostic API, and the vast majority of MOM providers support JMS.
Defined:
JMS (Java Messaging Service) is a technical specification for message-oriented middleware (MOM) on the Java platform that facilitates the message exchange of Java applications in the messaging system and simplifies the development of enterprise applications by providing a standard interface for generating, sending, and receiving messages. Translates to a Java messaging service.
Brief introduction:
JMS is a vendor-agnostic API used to access messaging system messages. It is similar to JDBC (Java databaseconnectivity): Here, JDBC is the API that can be used to access many different relational databases, while JMS provides the same vendor-independent access method to access the messaging service. Many vendors currently support JMS, including IBM's MQSeries, Bea's Weblogic JMS service, and Progress SonicMQ, which are just a few examples. JMS enables you to send messages from one JMS client to another through a messaging service (sometimes called a message broker or router). A message is a type object in JMS that consists of two parts: a header and a message body. The header consists of the routing information and the metadata about the message. The message body carries the data or payload of the application. Depending on the type of payload, messages can be divided into several types, each carrying: simple text (textmessage), serializable object (objectmessage), attribute collection (mapmessage), Byte Stream (bytesmessage), The original value stream (Streammessage), as well as a message with no payload.
JMS and MQ relationships:
JMS is a technical specification for providing a messaging service that develops all the data structures and interaction processes throughout the messaging service delivery process. MQ, the Message Queuing service, is the ultimate implementation of message-oriented middleware (MOM), a true service provider, and the implementation of MQ can be based on JMS or other specifications or standards.
Open source MQ with JMS support:
The most currently selected is ACTIVEMQ.
ActiveMQ is the most popular, powerful, open source messaging bus that Apache has produced. ActiveMQ is a JMS provider implementation that fully supports the JMS1.1 and the Java EE 1.4 specification, although the JMS specification has been around for a long time, but JMS still plays a special role in the middle of today's Java EE applications.
Main Features:
1. Write clients in multiple languages and protocols. Languages: Java, C, C + +, C #, Ruby, Perl, Python, PHP. Application protocol: Openwire,stomp REST,WSNOTIFICATION,XMPP,AMQP
2. Full support for JMS1.1 and the Java EE 1.4 specification (persistence, XA messages, transactions)
3. Support for spring, ACTIVEMQ can easily be embedded into the system using spring, but also support the features of Spring2.0
4. Tested by common Java EE servers (such as Geronimo,jboss 4, glassfish,weblogic), with the configuration of the JCA 1.5 resource adaptors, Allows ACTIVEMQ to automatically deploy to any compatible Java 1.4 Business Server
5. Support multiple transfer protocols: In-vm,tcp,ssl,nio,udp,jgroups,jxta
6. Support for high-speed message persistence through JDBC and journal
7. Designed to ensure a high-performance cluster, client-server, peer-to-peer
8. Support Ajax
9. Support for integration with axis
10. It is easy to call the embedded JMS provider for testing
ACTIVEMQ speed is very fast, usually 10 times times faster than JBOSSMQ.
Pros: is a fast open source Messaging Component (framework) that supports clusters, equivalent networks, automatic detection, TCP,SSL, broadcast, persistence, XA, and j2ee1.4 containers seamlessly combined, and supports lightweight containers and Java virtual machines on most cross-language clients. Message asynchronous acceptance, reducing the coupling degree of software multi-system integration. Messages are reliably received, ensuring that messages are reliably stored in the middleware, and that multiple messages can also form atomic transactions.
Disadvantage: ACTIVEMQ default configuration performance is low, need to optimize the configuration, but the configuration file is complex, ACTIVEMQ itself does not provide management tools; The document on the home page looks more comprehensive, but lacks an effective organization, the document is only fragments, the user is difficult to understand, two , the overall documentation is too professional. In the study stage can be found through maillist, see Javadoc, Analysis source code to understand.

JMS and ACTIVEMQ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.