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.
On the basic concept of JMS (i) –JMS, we introduced the canonical JMS of message communication, and this blog post introduces an open source JMS 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:
Transfer data from one application to another, or from one module of the software to another, responsible for establishing a channel for network communication and for the reliable transmission of data. Ensure that data is not re-sent, not lost, can achieve cross-platform operation, can be integrated into the software of different operating system Technician data transfer service 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
Apache Activemq™is The most popular and powerful open source messaging and Integration Patterns server.
Apache ActiveMQ is fast, supports many cross Language clients and protocols, comes with easy-to-use Enterprise integration Patterns and many advanced features while fully supporting JMS 1.1 and EE 1.4.
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. While fully supporting JMS 1.1 and Java EE 1.4.
Download ACTIVEMQ
Official website: http://activemq.apache.org/
Now ACTIVEMQ the latest version is 5.11.1, download is very simple, no longer screenshots. running the ACTIVEMQ service 1. Download and 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:
Bin is stored in the script file conf is stored in the basic configuration file is the data stored in the log file is the document examples storage is a simple instance of Lib storage is activemq required jar WebApps for the project directory
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 of the image.
If the above method fails to start, go to the bin directory, run cmd, and then tap the command: Activemq-admin.bat start.
From the image above we can see the storage address of ACTIVEMQ and the address that 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
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 multiple languages and protocols written by the client. Languages: Java, C, C + +, C #, Ruby, Perl, Python, PHP. Application protocol: Openwire,stomp REST,WS NOTIFICATION,XMPP,AMQP fully supports the JMS1.1 and the Java EE 1.4 specification (persistence, XA messages, transactions) for spring support, ACTIVEMQ can easily be embedded into a system that uses spring, and the Spring2.0 feature is tested by common Java EE servers (such as Geronimo,jboss 4, glassfish,weblogic), where the JCA The configuration of the 1.5 resource adaptors allows ACTIVEMQ to be deployed automatically to any compatible Java 1.4 Business Server to support multiple transfer protocols: In-vm,tcp,ssl,nio,udp,jgroups,jxta Support for high-speed message persistence through JDBC and journal designed to ensure high-performance clustering, client-server, point-to-point support AJAX support and Axis integration can easily call embedded JMS provider for testing What is the use of ACTIVEMQ? Integration between multiple projects
(1) Cross-platform
(2) Multi-lingual
(3) Multi-item
Reduces coupling between modules in the system, decoupling
(1) Software extensibility
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.
Summary 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.
Transferred from: http://blog.csdn.net/jiuqiyuliang/article/details/47160259