ActiveMQ is a high-performance messaging middleware, primarily for JMS implementations, while other languages can be used as well. Its support point to point, publish/subscribe, push-pull mode, specific reader network, here slightly.
1, the first download ACTIVEMQ, and successfully started the service.
2, build Maven project, add dependencies
Activemq-all-5.6.0.jar
3, Jms.xml
4. Write simple Java classes that send messages and receive message
I don't know that well, so this needs to be studied.JMS has 2 types of message domainsPoint-to-point mode 1.2. Publish subscription mode Publish/subscribe pub/sub modeTraditional JMS API DevelopmentCurrently there is no environment, so now write a demo, back to the environment to test aPackage Jms;import Javax.jms.connection;import Javax.jms.connectionfactory;import javax.jms.destination;import Javax.jms.jm
JMS learning Summary ii
JMS message model
The main content of the JMS message model is
Describes the three elements of the message model: Message Header, message attributes, and message body.
Detailed description of the basic content of the Message Header
Detailed description of message attributes
Message filtering and matching rules
References
Ht
A message object is divided into three parts: Headers, Properties, and Payload ). For StreamMessage andMapMessage, the message itself has a specific structure, while TextMessage, ObjectMessage, and BytesMessage are unstructured. A message can contain some important data or only notifications of an event.The Headers section of a message usually contains some message descriptions, which are standard descriptions. Contains the following values:JMSDestinationThe destination, Topic, or Queue of the m
Use JMS Transactions to improve efficiency
Http://fusesource.com/docs/broker/5.4/tuning/PersTuning-JmxTxn.html
You can improve efficiency of the broker using JMS transactions, because JMS transactions enable the broker to process messages inBatches. That is, a batch consists of all the messages a producer sends to the broker before calling commit. sending messag
A message object is divided into three parts: headers, properties, and payload ). For streammessage and mapmessage, the message itself has a specific structure, while for textmessage, objectmessage and bytesmessage, there is no structure. A message can contain some important data or only notifications of an event.The headers section of a message usually contains some message descriptions, which are standard descriptions. Contains the following values:1) jmsdestinationThe destination, topic, or q
JMS is the producer and consumer model. Consumers are responsible for messages generated by consumer producers. JMS can be done in the background of asynchronous operations, applied to the specific work, it is useful to send internal messages, e-mail, texting, big operation in the background to do asynchronous operations.The Java Messaging Service (Java message SERVICE,
Business scene: A system through a queue (assuming the queue name is QueueA) to the B system to send messages, then the business adjustment, B system split into two systems B1,B2, respectively, processing different business, and each need to obtain different messages from the QueueA. In order not to change the logic of a system, a system also sends different messages to b1,b2 through a queue. B1,B2 to automatically select the message that belongs to you, you can use the message filter. The speci
Activemq is the most popular and powerful open-source message bus produced by Apache. Activemq is a JMS provider that fully supports the jms1.1 and J2EE 1.4 specifications. Although it has been a long time since the JMS specifications were introduced, however, JMS still plays a special role in today's J2EE applications.
Main features:
1. Write clients in multiple
Original address: http://blog.csdn.net/haoxingfeng/article/details/9167895When we integrate with spring, for consumers we have three different types of listeners to choose from, they are messagelistener,sessionawaremessagelistener, Messagelisteneradapter, let's talk about the difference between them.1, MessageListenerMessageListener is the most primitive message listener and is the interface defined in the JMS specification. The OnMessage (Message mes
In previous articles in this series, we focused on JDBC's handling of local transactions, and this article will cover an example of a distributed transaction.Please download the GitHub source code in the following ways:git clone https://github.com/davenkin/jta-atomikos-hibernate-activemq.gitThe difference between a local transaction and a distributed transaction is that a local transaction is only used to process a single data source transaction (such as a single database), and a distributed tra
Java Message Service(The Java Messaging Service, referred to as JMS) solves this problem partly by providing a way to interact with Java EE applications or traditional systems.
The universal interface collection of JMS sends or receives messages asynchronously. Receiving messages asynchronously is clearly the best choice for clients that use intermittent network connections, such as mobile phones and PDAs.
Some time ago, I was told by a colleague that there are a lot of message status for receive in the client, which can only be consumed if the JMS server or WebLogic server is fully charged. After investigation, this problem may be a bug in the WebLogic, of course, does not exclude the possibility of the specific environment. Let's take a look at the root cause of the problem, which helps us to understand more about the implementation of WebLogic
The distributed transaction about the Dubbo service framework, although it is not urgent to do, but can be discussed.
I think the management of affairs should not belong to the Dubbo framework,Dubbo can only be managed by the transaction,Like JDBC and JMS are distributed resources that can be managed by transactions.Dubbo as long as the same behavior can be managed by the transaction, such as can be rolled back,The scheduling of other transactions sho
How to troubleshoot error messages that occur in the WebSphere Portal server v5.1.x log after security is enabled "The JMS Server Security Service was unable to authenticate UserID: Asdf ".Document #: 1897475j09000
Body:TitleHow to troubleshoot error messages that occur in the WebSphere Portal server v5.1.x log after security is enabled "The JMS Server Security Service was unable to authenticate UserID: Asd
ACTIVEMQ Study notes (iv)http://my.oschina.net/xiaoxishan/blog/380446 the use of native methods to send and receive messages from ACTIVEMQ. As you can see, every time you send and receive messages, you write a lot of repetitive code, and spring provides a much more convenient way for us, which is spring JMS. Let's start with an example. Includes the queue, the send and receive related spring configuration of the subject message, the code, the test. In
The two message transmission modes Topic and Queue in the Jms specification are compared as follows ():
Topic
Queue
Summary
Publish Subscribe messaging Publish and Subscribe messages
Point-to-Point
Status or not
Topic data is stateless by default.
By default, Queue data is stored as files on the mq server. For example, Active MQ is generally stored under $ AMQ_HOME/data/kr-store/data. You can also config
The company's technology platform in the docking of IBM MQ message middleware with a broker, messages sent to MQ have more message header information:RHF2, resulting in the reception of the message is not working properly. Record how this problem is handled here.A parameter, targetclient, is provided in IBM MQ that can be used to control whether the message header is enabled in a JMS message. When using JMS
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.