configuration information
* data--log files and message persistence data are saved in this directory.
* docs--contains a simple index.html file that points to the ACTIVEMQ URL
* example--example; we'll use it to quickly test ACTIVEMQ
* Lib--lib directory holds all libraries required for ACTIVEMQ
* user-guide.html--a short guide to starting
Activemq-web-console is used by default by importing jetty. XML in activemq. XML to configure a jetty server.
In fact, activemq-web-console can be deployed separately from activemq-broker.
Two deployment methods:
1. Directly
The default way to use Activemq-web-console is to configure a jetty server by importing Jetty.xml in Activemq.xml.In fact Activemq-web-console can completely and activemq-broker separate to deploy.Two ways to deploy:1. Deploy Apache-acti
ACTIVEMQ uses the jetty server, opens the Conf/jetty.xml file in the ACTIVEMQ installation directory, and finds
Change the property name to authenticate value= "false" to "true", and the console's login username password is saved in the Conf/jetty-realm.properties file as follows:
# #---------------------------------------------------------------------------# # Licensed to the Apache Software Foun
ACTIVEMQ has a web management side.Starting mode:./bin/activemqAbout Jetty.xml, Jetty-realm.properties, Web. xmlJetty.xml configuration IP and port default is 8161.Jetty.xml access rights for different roles. Jetty-realm.properties Configuring user names and passwords and role classificationsadmin: admin123, adminuser: user123, userControl InterfaceACTIVEMQ's web Management console
In the Java field, it is very common to integrate a product into the application server, and it is more common to integrate the message middleware into the application server.Currently, open-source application servers are widely used in Geronimo and JBoss. The default JMS provider of Geronimo is activemq, while the default JMS provider of JBoss application server is jbossmq. Integrating activemq into JBoss
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
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
servers: Apache Tomcat, Jetty, ApacheGeronimo, and Jboss are supported;
Client APIs in multiple languages: supports C/C ++,. NET, Perl, PHP, Python, Ruby, etc;
Cluster;
Dynamic and simple management.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1435322321-2.jpg "title =" slide 22.JPG" alt = "182725139.jpg"/>
ActiveMQ is developed using Java, Spring bean configuration, and Maven.
The source code directory s
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 networkConnectors). ActiveMQ allows client application
occurs during online server deployment and the website management interface is as follows:
Du Niang hasn't found a solution for a long time. Later, when I read the ActiveMQ official document in part N, I can see that the activemq console parameter can be used for foreground startup, which may expose the cause of the error, the command is as follows:
# Stop acti
consumer = session.createconsumer (destination); ObjectMessage message =(objectmessage) consumer.receive ();
if (message!= null) {String messagestring = (string) message.getobject ();
System.out.println ("Receive:" + messagestring); }
}
}
See console print out: Receive:hello world ..., know to receive the message, the inside flow face ah ah ah ah ...
> Close
Query process ID (PID) to prevent its process:
Ps-ef | grep
the message is sent. Destination Destination;Consumer, message recipient Messageconsumer consumer; ConnectionFactory =New Activemqconnectionfactory ("Admin","Admin","tcp://192.168.3.159:61616");try {Construction gets the connection object from the factory connection = Connectionfactory.createconnection ();Start Connection.start ();Get Operation ConnectionThis best still has a business session = Connection.createsession (Boolean.false, Session.auto_acknowledge);Get session Note parameter value X
, Session.auto_acknowledge); Get session Note parameter value Xingbo.xu-queue is a server queue that must be configured in ACTIVEMQ console destination = Session.createqueue ("Test-queue")
;
Consumer = session.createconsumer (destination);
Consumer.setmessagelistener (New MessageListener () {@Override public void onMessage (message message) {try {
Mqbean bean = (mqbean) (objectmessage) message
Number Of ConsumersNumber Of Pending Messages waiting for consumptionMessages Enqueued: the message that enters the queue.Messages Dequeued has a message in the queue.OperationsPurge Purification
When a message enters the queue, the message waiting
configure the maximum number of connections supported by this port, set the maximum transfer value for each message, set the maximum number of worker threads used by NIO for the thread pool (of course, you already know where the documents for these settings are located, So you can set the property to increase or decrease according to your own situation):transportConnector name="auto+nio" uri="auto+nio://0.0.0.0:61608?maximumConnections=1000amp;wireFormat.maxFrameSize=104857600amp;org.apache.act
ArticleDirectory
How to monitor activemq
Third-party tools
How to monitor activemq how to monitor activemq
In activemq 4.x, You can monitor the proxy and view which targets are used. You can use the following tools to view the activities and subscriptions associated with
consumers are created by the sessionI installed the Windows version here, after the installation of the directory is suchTo the bin directory, start Activemq.batThis will start the success.Visit http://localhost:8161/admin/index.jsp to see the console, such as:Spring Boot Integration ACTIVEMQ:Referenced in Pom.xmlTo configure the ACTIVEMQ connection in application.properties:SPRING.ACTIVEMQ.BROKER-URL=TCP:
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.