ActiveMQ-cpp client abnormal application exit problem, activemq Client
The author uses ActiveMQ as the server for message distribution in the system. The Java Web program reads the database real-time records as the Producer, and the receiving end is the
ACTIVEMQ This open source messaging server provides multi-lingual support, in addition to the General Java client, you can also use the C + +, PHP, Python, JavaScript (Ajax) and other languages to develop the client. Recently, because of project needs, we need to provide PHP and Python theme subscription client. Here,
ActiveMQ-cpp client application exited abnormallyThe author uses ActiveMQ as the server for message distribution in the system. The Java Web program reads the database real-time records as the Producer, and the receiving end is the client program developed by C ++ Builder. It is resident in the lower right corner of th
1. Use activemq through JNDI
1. Configure the JMS object in JNDI
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory # use the following property to configure the default connectorjava.naming.provider.url = vm://localhost # use the following property to specify the JNDI name the connection factory# should appear as.#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry # register som
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 th
The main role of a JMS broker such as ActiveMQ is to provide a communicationInfrastructure for client applications. For that reason, ActiveMQ provides connectors,A connectivity mechanism that provides client-to-broker communications (usingTransport connectors) as well as Broker-to-broker communications (using networkCo
/optionalfolder, which is the package we use for integration with jbossmq.3. Ensure that JBoss can be started correctly before activemq is integrated into JBoss.II. Specific integration steps1. Install jdk1.5Install jdk1.5 and ensure that it runs correctly.
2. Install the JBoss Application ServerInstall the JBoss application server and make it run properly before activemq is integrated.Run the following com
1. Quick Start 1: download the latest version from the official website. The latest version is 5.9.0 2. Unzip the package, open cmd, enter the bin directory, and run activemq. (In linux, enter nohup activemq ) to check the output startup log. Loading message broker from: xbean: activemq. xml, which is the main configuration file. Using Persistence Adapter: KahaDB
systems. The overall idea of MOM is that it serves as a message intermediary between the message sender and the message receiver, which provides a completely new level of loose coupling ."
"What about JMS?"
Cheng xiaopang is a person pursuing perfection. In order to make it easier to understand, he simply moved to a whiteboard and painted it.
"JMS is called Java Message Service and is a technical specification for MOM on the Java platform, it aims to simplify the development of enterprise appli
installation and start-up of Activemq
Install Java Configuration Java environment
download ACTIVEMQUnzip the compressed packageTar zxvf activemq-x.x.x-bin.tar.gzAt this point, Linux under the ACTIVEMQ installation work is completed.ACTIVEMQ startup under LinuxThe startup Activemq is split into two modes, starting wit
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 for integration with axis
It is easy to call the embedded JMS provider for testing
5.2 What is the use of ACTIVEMQ?
Integration between multiple
, actually just to say that JMS is just a set of API interfaces defined by Sun in order to unify the vendor's interface specification.2. JMS ArchitectureThe description is as follows:
JMS providers (implementations of JMS, such as Activemq jbossmq, etc.)
JMS Client (a program or object that uses a provider to send a message, for example, in 12306, is responsible for sending a ticket to the proc
Described below: JMS providers (implementations of JMS, such as Activemq jbossmq, etc.) JMS clients (Programs or objects that use the provider to send messages, for example, in 12306, responsible for sending a ticket message to the processing queue to solve the ticket-purchase peak problem, Programs that send messages to queues and programs that get messages from queues are called customers. JMS producers, JMS consumers (producers and customers respo
1.5 resource adaptors, Allows ACTIVEMQ to automatically deploy to any compatible Java EE
1.4 On commercial Server
⒌ supports multiple transfer protocols: In-vm,tcp,ssl,nio,udp,jgroups,jxta
⒍ support for high-speed message persistence through JDBC and journal
⒎ is designed to ensure high-performance clustering, client-server, point-to-point
⒏ supports Ajax
⒐ support for integration with axis
⒑ can easily in
, when the master is down and the lock is released, other slave will automatically become the master when the exclusive lock is obtained. The deployment structure is as follows:
To configure the second scheme, you only need to modify the activemq. xml file in the config folder and modify the scheme for message Persistence:
1
Message producer code:
1 public class P2PSender {2 private static final String QUEUE = "client1-to-client2"; 3 4 public stati
The above "Architecture design: Inter-system Communication (--ACTIVEMQ) installation and use"3, ACTIVEMQ performance optimization ideasThe two sections in the previous article mainly introduce the installation and basic use of the message middleware ACTIVEMQ. From the installation configuration and sample code given in the previous article, we have neither modifi
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.