ACTIVEMQ can be easily integrated with spring, Spring provides a series of interface classes, very useful!such as asynchronous message data, asynchronous send mail, asynchronous message query, etc. The first two ACTIVEMQ jar packages are introduced,The is then spring-activemq for configuration: Create a third-party MQ factory: ConnectionFactoryThen create the
First, introduceSince ActiveMQ5.4, KAHADB has become the default persistent storage method for ACTIVEMQ. Compared to the original AMQ storage, the official claims that KAHADB uses fewer file descriptors and provides a faster storage recovery mechanism.Second, KAHADB storage configurationThe configuration in Conf/activemq.xml is as follows:BrokerBrokername= "Broker" ... > Persistenceadapter> kahadb Directory= "
DeliveryMode refers to whether messages that were not consumed in the original queue or subject remain when the ACTIVEMQ is restarted
I have done the following tests myself through the code, and the test steps and results are as follows:
Create the producer and set the producer DeliveryMode to persistent and run producer
Restart ACTIVEMQ before the message is consumed by consumer
Tags: syslog technology share highlight RIP/USR boot start/etc OCA one1, under the root permission to operate2, Ln-s/USR/LOCAL/ACTIVEMQ/BIN/ACTIVEMQ/ETC/INIT.D/ACTIVEMQ3, VI/ETC/INIT.D/ACTIVEMQ4, add in the second line# # # # BEGIN INIT INFO # provides: activemq # required-start: $remote _fs $syslog # required-stop: $remote _fs $syslog
Before installing, it is necessary to make sure that the JVM environment is already on the machine, and if not, the unable to execute Java command will be prompted during the installation process. The system cannot find the file specifiedFirst step: Download the ACTIVEMQ installation file from the official website and select the version on the Windows platformOfficial website: http://activemq.apache.org/activemq
ACTIVEMQ the process of sending and receiving messages is similar to the JDBC Operations database: First create the Connection connection object, then the session object, and then create producer, Consumer, Objects such as message, except that ACTIVEMQ connection objects are generated through the Activemqconnectionfactory factory. Here are the test code for some scenarios. Define some constant data, which i
1, ACTIVEMQ Management background user name, password settingsManage background address http://localhost:8161/admin Default User name Password Admin adminThe port defaults to 8161, and the service uses the server, so we go into the Conf/jetty.xml(1) Modify the port number: class= "Org.apache.activemq.web.WebConsolePort" init-method= "Start" > defaultfor the Web console-- 8161"/> (2) in the change of user name and password (use
One, ACTIVEMQ high availability architectureACTIVEMQ's high availability architecture is based on the Master/slave model. ACTIVEMQ provides a total of four configuration scenarios to configure Ha, where shared nothing master/slave is no longer used after version 5.8, and zookeeper-based replicated is introduced in the ActiveMQ5.9 version LevelDB Store ha scenario.Second, the configuration explanation of Mas
1.ActiveMQ Network Bridging 1.1 ActiveMQtransmission Mode ActiveMQ by means of communication: bridging and forwarding and bidirectional communication 1. bridging forwarding is a Broker that passes messages to another ActiveMQ . 2. Two-way communication is the use of a channel can either receive messages or send messages. The message that is pushed to Broker
RECEIVED a email type message");P.send (tm);} else if (Message.getobjectproperty ("message") = = null) {Messageaction m = new messageaction ();SM SM = new SM ();Sm.setdesttermid (String) message.getobjectproperty ("message"));Sm.setmsgcontent ("Distributed JMS-ACTIVEMQ system testing");M.ADDSM (SM);Message.acknowledge ();} else {SYSTEM.OUT.PRINTLN ("Receive normal messages, do not do any processing!") ");}} catch (JMSException e) {E.printstacktrace (
Recently in the study of OFBiz JMS, played with ACTIVEMQ, ofbiz use Jndi and other JMS to receive and send messages, summed up.Prepareofbiz12.04 versionACTIVEMQ version 5.5Jar PackageIntroducing the package under Base/libActivemq-all-5.5.0.jarGeronimo-j2ee-management_1.1_spec-1.0.1.jarService engine Configurationjndi.properties ConfigurationTry only one topic message mode, if you want to use queue queues, configureTestStart
Activemq runs stably and data throughput is high. If the incoming or outgoing queue is slow, check your ownCodeIs it too slow to process the obtained data.
The performance optimization mentioned in this Article is to list some important points. Please make sure your project has no problems:
1. Use spring jmstemplate
The send and convertandsend modes of jmstemplate use persistent mode even if non_persistent is set. This slows down the inbound que
The reconnection mechanism is one of the specific manifestations of activemq's high availability.
Specifically, you can use the Failover method to connect to one or more brokerurls after the connection is disconnected.
For example: failover :( TCP: // 127.0.0.1: 61616). Multiple URLs can be used here.
By default, if the client and the broker are disconnected directly, the client starts a new thread,
Continuously obtain a URL from the URL parameter to retry the connection.
This mechanism has a pr
1. Basic Concepts
ActiveMQ: It is the most popular and powerful open source message bus that is produced by Apache. is a JMS provider implementation that fully supports the JMS1.1 and Java EE 1.4 specifications.
JMS (Java Messaging Service): is a Java platform for message-oriented middleware (MOM) APIs for sending messages between two applications, or distributed systems, for asynchronous communication. 2. JMS Message mode
1 point to point or queue m
required to unlock the blocking operation itself. 2. JMS Provider (ActiveMQ) features and advantages to achieve JMS1.1 specifications, support j2ee1.4 above. Enables multiple-language clients (Java, C, C + +, Ajax, ActionScript, and so on) with any JVM and most web containers (ActiveMQ works great the Any JVM) to support a variety of protocols (stomp, Openwire, REST) Good Spring support (
Build environment: Linux is centos7.4 (please note that centos7 the following version of the firewall and CENTOS7 above, the use of Redis Client connection Redis will be different, it is recommended to use CENTOS7 version) One, download Redis client Official Download Address: https://github.com/uglide/RedisDesktopManager/releasesBecause it is a foreign website, d
Activemq-webconsole repair enhanced Edition
Project address: https://github.com/hengyunabc/activemq-webconsole-enhanced
This fix enhanced version is based on activemq5.8.0: http://activemq.apache.org/activemq-580-release.html.
Fixed some display bugs and enhanced the Web Console functionality.
Fixed a problem where connection information could not be
Objective
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.
First, use the introduction environment prepa
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.