Simple Introduction to JMS (ii)--ACTIVEMQ

Source: Internet
Author: User

In the real enterprise, the application of message communication has been very hot, and plays a special role in the enterprise application of the Java EE, so it is very necessary to study it.

In brief, the basic concept of JMS (a) –JMS, we introduce the canonical JMS of message communication, we introduce an open source JMS concrete implementation--activemq. ACTIVEMQ is an easy-to-use message middleware.

Message middleware

We simply introduce the message middleware, have a basic understanding of it good, message middleware (mom:message Orient middleware).

Message middleware has a number of uses and benefits:
1. Transfer data from one application to another, or from one module of the software to another module;
2. Responsible for the establishment of network communication channels, the reliable transmission of data.
3. Ensure the data is not re-sent, not lost
4. Can realize cross-platform operation, can integrate mechanic data transfer service for software of different operating system

Mq

First of all, a brief introduction of the MQ,MQ English name MessageQueue, the Chinese name is the message queue used by everyone, why use it, plainly speaking is a message to accept and forward the container, can be used for message push.

Below to enter our today's theme, for you to introduce ACTIVEMQ:

ACTIVEMQ Brief overview Activemq

ACTIVEMQ is the most popular and powerful open source messaging bus produced by Apache. The ACTIVEMQ is a JMS provider implementation that fully supports the JMS1.1 and the Java EE 1.4 specification, which is fast, supports multiple language clients and protocols, and can be easily embedded into the enterprise's application environment with many advanced features.

Below we download a version, play a play.

Download ACTIVEMQ

Official website: http://activemq.apache.org/
Now ACTIVEMQ the latest version is 5.11.1, download is very simple, it is no longer.

Running the ACTIVEMQ service
    1. Download, unzip
      Now that we're good, we'll extract the apache-activemq-5.11.1-bin.zip and we can see its overall directory structure:

      From its directory, it is still very simple:
      • The bin holds the script file
      • Conf storage is a basic configuration file
      • Data is stored in a log file
      • Docs is stored in the documentation
      • Examples storage is a simple example
      • Lib is storing the jar package required by ACTIVEMQ
      • WebApps directory for storing projects
    2. Start ACTIVEMQ
      We understand the basic directory of ACTIVEMQ, below we run the ACTIVEMQ service, double-click the bin directory under the Activemq.bat script file or run your own computer version of the Activemq.bat, you can see the effect.

We can see the address of the ACTIVEMQ and the address the browser wants to access.
3. Testing

ACTIVEMQ The TCP connection port that is used by default is 61616, you can test whether ACTIVEMQ successfully started Netstat-an|find "61616" by viewing the port information

C:\Documents and Settings\Administrator>netstat -an|find "61616" TCP     0.0.0.0:61616     0.0.0.0:0       LISTENING

4. Monitoring
ACTIVEMQ launches the built-in jetty server by default, providing an admin app for monitoring activemq.
admin:http://127.0.0.1:8161/admin/

User name and password are admin


5. At this point, the server is up and ready.

To stop the server, just press ctrl+shift+c, then enter Y.

We simply talk about ACTIVEMQ features, many online, just to ensure the integrity of the blog post.

ACTIVEMQ Feature List
    1. Multiple languages and protocols for writing clients. Languages: Java, C, C + +, C #, Ruby, Perl, Python, PHP. Application protocol: Openwire,stomp REST,WS NOTIFICATION,XMPP,AMQP
    2. Full support for JMS1.1 and the Java EE 1.4 specification (persistence, XA messages, transactions)
    3. With spring support, ACTIVEMQ can easily be embedded into a system that uses spring, and also supports Spring2.0 features
    4. Tested by common Java EE servers (such as Geronimo,jboss 4, glassfish,weblogic), where the configuration of the JCA 1.5 resource adaptors allows ACTIVEMQ to automatically deploy to any compatible Java EE 1.4 On commercial Server
    5. Supports 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 high-performance clustering, client-server, point-to-point
    8. Support Ajax
    9. Support for integration with axis
    10. It is easy to call the embedded JMS provider for testing
What is the use of ACTIVEMQ?
    1. Integration between multiple projects
      (1) Cross-platform
      (2) Multi-lingual
      (3) Multi-item
    2. Reduces coupling between modules in the system, decoupling
      (1) Software extensibility
    3. System front-end isolation
      (1) Isolation of front and rear end, shielding high safety zone

In fact, there are many applications Activemq, we can search the Internet, no longer one by one examples.

Summarize

ACTIVEMQ is not difficult, with a lot of advantages.

In the next blog post, we make a simple example, truly experience the charm of a activemq.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Simple Introduction to JMS (ii)--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.