As mentioned earlier, JMSCorrelationID is mainly used to associate multiple messages. For example, when a Message needs to be repliedSet JMSCorrelationID to the ID of the original message. In the following example, three message producers A, B, C and three message consumers A, B, and C are created. Producer A sends A message to consumer A, and consumer A needs to send A message to consumer. B and C are similar to.The diagram is as follows:Producer A ----- send ----> consumer A ----- reply ------
JMS message persistence: Persistence of ActiveMQ messages to mySql database ActiveMQ5.8.0 uses kahadb as the default message persistence mode. By using the default persistence mechanism, we cannot directly see how the message persists. The JDBC persistence mechanism provided by ActiveMQ can store persistent information to the database. By viewing the table structure and stored data generated by ActiveMQ in the database, we can better understand the me
When developing JMS in jboss5.1 today, call the followingCodeError:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Queueconnectionfactory Factory=(Queueconnectionfactory) CTX. Lookup ("Queueconnectionfactory");
Error exception information:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 Javax. Naming. namenotfoundexception: queueconnecti
If javax. Naming. namenotfoundexception: JMS not bound appears during running,Because JBoss does not create a queue object, you need to manually configure the queue object. You can create a xxx-service.xml file in the
For tomcat to use the JMS collection configuration, you need to add subsequent configuration parameters. In this example, start the configuration in Tomcat under eclipse.Add:-DCOM. Sun. Management. jmxremote. Port = 9089-DCOM. Sun. Management. jmxremote. SSL = false-DCOM. Sun. Management. jmxremote. Authenticate = falseYou can also add the preceding configuration to the bin/Catalina. BAT file in the tomcat installation directory. You can also view the
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/14353251N-0.jpg "title =" slide into jpg" alt = "182606887.jpg"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1435325Q2-1.jpg "title =" slide 21.JPG" alt = "182631115.jpg"/>
First, we will briefly introduce ActiveMQ. ActiveMQ is an open-source free Message Server provided by the Apache Software Foundation. Its current version is 5.8.0.
ActiveMQ has the following features
= "Com.activemqtest.serviceImpl.TopicProvider" > the - - the theclass= "Com.activemqtest.serviceImpl.TopicMessageListener"/> the the - class= "Org.springframework.jms.listener.DefaultMessageListenerContainer" > the the the94 the theView CodeDispactcherservlet.xml123Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"4xmlns:context= "Http://www.springframework.org/schema/context"5Xmlns:mvc= "Http://www.springframework.org/schema/mvc"6xsi:schemalocation= "Http://www.springframework.
The last blog introduced the ACTIVEMQ based on JMS point-to-point messaging mechanism implementation, here is another publish/subscribe method implementation.
Publish subscription model
It's like subscribing to a newspaper. We can choose one or more newspapers, for example: Beijing daily, People's daily. These newspapers are equivalent to topic in the release subscription model. If a lot of people subscribe to the same newspaper, we are registered in
1, the difference between the communication platformJMS: Only allow communication between the Java-based implementation of the messaging platformAMQP: Allows multiple message protocols to communicate, such as Ruby's Storm and Java JMS can communicate on AMQP.Conclusion: AMQP allows multiple techniques for simultaneous protocol communication
2, the difference of communication mechanismJMS: Message producers and message consumers must know each other's
JMS Security
Some topic and queues require the appropriate permissions to operate.
Topic and queue permissions can be set in
Name = "Jboss.messaging.destination:service=topic,name=testtopic"XMBEAN-DD = "Xmdesc/topic-xmbean.xml" >
If security is not set, use
If you want to operate a security queue or topic, you can use spring's usercredentialsconnectionfactoryadapter. The settings in spring are as follows:
Jndi-name = "ConnectionFactory" >Java.n
This article is a simple way to integrate spring and ACTIVEMQ, only for reference learning, with a focus on understanding the concept.
1:JMS is a standard API developed by Sun to access message-oriented middleware (MOM), and the MOM component in this article is activeMq. You can download activeMq packages to the http://activemq.apache.org/download.html Web site,
It is very simple to use, after decompression directly run the D:\activemq-4.1.1\bin dir
Reprinted from: http://zld406504302.iteye.com/blog/1909751
Recently with spring3.2 JMS and activemq5.8 integration, the implementation of asynchronous send, asynchronous receive function, and attached the test code1) UML as follows[img] Message acceptance is fully managed in Org.springframework.jms.listener.DefaultMessageListenerContainer, sending the client without concern for message acceptance[/IMG]2) Applicationcontext.xml Fragment Java code 3)
The ActiveMQ5.8.0 version uses KAHADB as the default message persistence method. Using the default persistence mechanism, it is not easy to see exactly how the message lasts. ACTIVEMQ provides a JDBC persistence mechanism to store persistent information in a database. By looking at the table structure and stored data generated by ACTIVEMQ in the database, you can help us better understand the persistence mechanism of the message. Now we'll show you how to configure ACTIVEMQ to persist data to My
When the search engine grasps the lifeblood of the Internet economy, the typical application of the Internet, which is created by the search behavior, will affect all the people and things related to it. For the moment, we call the economic model of the related behavior a search economy. In this section we discuss one of the most basic elements of a search economy – search keywords.
What are the key words? It can be any word in any language, mainly in the form of words. The essence of writing i
The meaning of directory and file permissions in Linux
The meaning of file permission
R: You can read the specific contents of this document;
W: You can edit the contents of this file, including adding the details of the deleted file;
X: The file has executable permissions-------Note: Here and window is not the same, in win, the file executable permissions are expressed through the extension, such as EX
What is the definition in C language? What is the meaning of the statement? What is the difference between them ?, Meaning difference
In the C language, we may be very familiar with definitions and declarations, but we may not really understand them!
Definition meaning: the so-called definition is to create (compiler) an object, allocate a memory space for this
String formatting symbolic meaning
Symbol
Description
%c
Formatting characters and their ASCII code
%s
formatting strings
%d
formatting integers
%o
Formatting an unsigned octal number
%x
formatting unsigned hexadecimal numbers
%x
Format unsigned hexadecimal number (uppercase)
%f
Format fixed-point numb
String formatting symbolic meaning
Symbol
Description
%c
Formatting characters and their ASCII code
%s
formatting strings
%d
formatting integers
%o
Formatting an unsigned octal number
%x
formatting unsigned hexadecimal numbers
%x
Format unsigned hexadecimal number (uppercase)
%f
Format fixed-point numb
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.