ZOOKEEPER+ACTIVEMQ Configuration message Middleware cluster Spring Client connection

Source: Internet
Author: User
Tags zookeeper

The previous section on the ACTIVEMQ server Building, here is the spring configuration, in fact, this is not too much to say, just a few points, with the Project Eclipse Project package, everyone download the project to see


The main use is the Receive class and the sender class, the configuration file is mainly Application-jms-queue-offical-service.xml

The configuration file definitions are written in more detail in the XML above, and note that the ACTIVEMQ beans XML domain namespace is introduced into the configuration file, and the following dependencies need to be introduced into the Pom.xml:

<dependency>
<artifactId>xbean-spring</artifactId>
<groupId>org.apache.xbean</groupId>
<version>4.1</version>
</dependency>

Or you'll throw the wrong


In the spring configuration, a retransmission policy map definition is introduced, in which you can customize the retransmission policy for each queue (a single queue is uniquely identified by the queue name and the destination object reference)

If an exception is thrown in the OnMessage method, you need to configure the transaction to open in Listenercontainer so that once the exception is thrown, the retransmission is repeated, and after the maximum number of retransmissions, the message is placed in the corresponding DLQ of the queue if it has not been successfully transmitted again.


Project Engineering Attachment Connection

http://download.csdn.net/detail/icecream0/8485021


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.