H
Page:
HA
High Availability. This typically refers to having a number of available instances of a service (such as a Message Broker) such that if the instance you're connected to fails, you can failover quickly to another instance providing high availabliity and resilience
Page:
Hello World
following is a very simple JMS application with multiple, concurrent, consumers and producers. See the Initial Configuration guide for details on how to setup your classpath correctly. Things you might do after running this example: Setup a broker Run Broker ...
Page:
Hermes Jms
You can use ActiveMQ with Hermes JMS http://hermesjms.sourceforge.net/ which is a graphical user interface for working with JMS queues. Please refer to the Hermes JMS http://hermesjms.sourceforge.net/ site for detailed instructions on using this software. Demo Mark Bucayan kindly ...
Page:
Hermes Screenshot
following is an example of running HermesJms with ActiveMQ on OS X !http://activemq.codehaus.org/hermes.png
Page:
Horizontal Scaling
Page:
How can I add a new type of transport
ActiveMQ is specifically designed to allow custom transports to be plugged in. You can programatically create TransportConnector instances and add them to the BrokerService in Java code using the BrokerService.addConnector() method http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/broker/BrokerService.html ...
Page:
How can I avoid serialization of Objects in ObjectMessage
Use the VM transport and see details on how to disable serialization to pass by value How should I use the VM transport
Page:
How can I contribute
How can I contribute to Apache ActiveMQ
Page:
How can I enable detailed logging
How can I enable detailed logging We use commonslogging so you can use that to enable debug tracing http://jakarta.apache.org/commons/logging/apidocs/org/apache/commons/logging/impl/SimpleLog.html. Or if you've got log4j.jar ...
Page:
How can I get a list of the topics and queues in a broker
How can I get a list of the topics and queues in a broker? As of 5.1.0 you can use the new DestinationSource http://activemq.apache.org/maven/activemqcore/apidocs/org/apache/activemq/advisory/DestinationSource.html on an ActiveMQConnection to access the available queues or topics ...
Page:
How can I get help
Page:
How can I get the source code from subversion
Page:
How can I make ActiveMQ faster
See the ActiveMQ Tuning Guide http://fusesource.com/wiki/display/ProdInfo/FUSEMessageBrokerPerformanceTuningGuide
Page:
How can I monitor ActiveMQ
How can I monitor ActiveMQ In ActiveMQ 4.x you can monitor the broker to see what destinations are being used, their activity along with connections and subscriptions using the following tools JMX and a JMX console such as jConsole http://java.sun.com/developer ...
Page:
How can I monitor the connection with the broker
How can I monitor the connection with the broker You can monitor the status of the connection with the broker via the addTransportListener() method on the ActiveMQConnection http://activemq.apache.org/maven/activemqcore/apidocs/org/apache/activemq/ActiveMQConnection.html#addTransportListener(org.apache.activemq.transport.TransportListener). This method takes a TransportListener ...
Page:
How can I see what destinations are used
easiest way is to use JMX by pointing your JMX console or JConsole at the broker JVM. You can also get all of the active destinations from the broker using Java code via getDestinations() http://activemq.apache.org/maven/activemqcore/apidocs ...
Page:
How can I support auto reconnection
How can I support auto reconnection? Networks are unreliable and sockets do get dropped from time to time (it could be a network glitch, dodgy router, firewall, or someone could even just restart a broker). You often want ...
Page:
How can I support priority queues
How can I support priority queues? Use Message Priority A common requirement is to support priority consumption; so high priority messages are consumed before low priority. In version 5.4 priority queues are supported. Both the message cursors ...
Page:
How can I use different network protocols
easy configuration, ActiveMQ supports a configurable URL to denote the connection mechanism to other clients. There is an example of how to do this along with a description of the available protocols in the Protocols overview URI Protocols
Page:
How do distributed queues work
various Topologies that you can employ with ActiveMQ, where clients are connected to message brokers in various ways like peer based client server hub and spoke Each client communicates with a broker using some kind of client library and network ...
Page:
How do durable queues and topics work
Durable queues keep messages around persistently for any suitable consumer to consume them. Durable queues do not need to concern themselves with which consumer is going to consume the messages at some point in the future. There is just one copy of a message that any ...
Page:
How do I access ActiveMQ from C
See the C Integration page for the available options
Page:
How do I access ActiveMQ from CSharp or dotNet
Page:
How do I access ActiveMQ from Ruby, Perl, Python, PHP
Use Stomp http://stomp.codehaus.org/ which is a simple to implement client protocol for working with ActiveMQ and other messaging systems
Page:
How do I add my own plugins
See Developing Plugins for how to add your own functionality into Apache ActiveMQ
Page:
How do I avoid Maven downloading latest jars
You can use the \o switch (for offline mode) to avoid maven autodownloading new snapshot jars (e.g. the Geronimo jars at the time of writing). maven o or to run a server go to the \assembly module and run maven o server
Page:
How do I back-up KahaDB
creating a backup, there may be an issue with the lock file, or with an inuse journal file. The lock file is not important but you would want the latest journal files. # Freeze the filesystem containing the database to ensure that you get a consistent snapshot of the journal ...
Page:
How do I bridge different JMS providers
bridge from ActiveMQ to another JMS provider use the JMS bridge jms to jms bridge. To bridge to another kind of transport completely, use Camel http://camel.apache.org or ServiceMix http://servicemix.apache.org
Page:
How do I build but disable the unit tests
How do I build but disable the unit tests The test cases in ActiveMQ can take a very long time to run! :) To disable this you can try the following mvn install Dmaven.test.skip=true
Page:
How do I change dispatch policy
much simpler and more powerful in ActiveMQ 4.0 you can configure different Dispatch Policies directly. For now in ActiveMQ 3.x we have a PrefetchPolicy configuration What is the prefetch limit for. This allows a certain number of messages to be dispatched to a consumer before ...
Page:
How do I change the logging
How do I change the logging We use commonslogging http://jakarta.apache.org/commons/logging/ to log information in the broker client and the broker itself so you can fully configure which logging levels are used and whether to log to files ...
Page:
How do I change the message store directory for an embedded broker.
Embedded brokers create an ActiveMQ directory under the current working directory to store it's persistent message data. To change the location of the directory used by the message store, set the activemq.store.dir system property to the directory you want it to use. Example: java ...
Page:
How do I compile from the source
How do I compile from the source code? See the Building page
Page:
How do I configure 10s of 1000s of Queues in a single broker ?
Page:
How do I configure ActiveMQ to hold 100s of millions of Queue Messages ?
Page:
How do I configure ActiveMQ to use AIO server transport
Windows XP: 1. Download AIO (Asynchronous IO for Java) from IBM (http://www.alphaworks.ibm.com/tech/aio4j). 2. Unzip the downloaded file and copy the following files: ibmaio.dll ibmaio1.0.jar 3. Place ibmaio.dll into Windows System32 folder. (You may ...
Page:
How do I configure automatic reconnection
JMS broker goes down, ActiveMQ can automatically reconnect to an available JMS broker using the failover: protocol. Not only does this automatically reconnect, it will also resume any temporary destinations, sessions, producers and most importantly consumers. All ...
Page:
How do I configure distributed queues or topics
How do I configure distributed queues or topics You don't need to explicitly configure distributed queues or topics How do I configure the queues I want as any queue or topic is automatically distributed across other brokers ...
Page:
How do I configure the queues I want
ActiveMQ there is no real resaon to explicitly setup/configure the queues you are gonna need. If you try to publish or subscribe from any queue or topic it will be silently created on the fly. Sometimes people put destinations into JNDI so that they can be pulled out ...
Page:
How do I connect to one of a number of message brokers
You can specify a list of URLs to connect to (for example if you have message brokers running on a number of machines). To specify a list of URLs, use a comma separated list of URLs with a prefix of list:. e.g. list:tcp://localhost:61699,tcp://localhost ...
Page:
How do I consume a specific message
you want to consume messages in a different order, or consume specific messages at the head, middle or tail of the queue, you can browse the messages using the QueueBrowser to find the JMSMessageID's of the messages you want to consume create a new consumer with a selector matching ...
Page:
How do I create new destinations
ActiveMQ you do not have to create destinations up front before you can use them. The ActiveMQ broker autocreates the physical resources associated with a destination on demand (i.e. when messages are sent to a new destination on a broker). This means that a client ...
Page:
how do I debug ActiveMQ from my IDE?
One option is to run your broker in the same JVM as your application; see how to unit test jms code. Or you can try uncommenting ACTIVEMQDEBUGOPTS in your activemq start script (bin/activemq or bin\activemq.bat) and start remote ...
Page:
How do I define a local address and local port for TCP or SSL
feature is only available in ActiveMQ 4.0 TCP based transport protocols (including SSL) allow you to define the local address and local port for Socket to use when it's created. This can be useful for clients that reside on multihomed machines or for clients ...
Page:
How do I delete a destination
How do I delete a destination via Java code or JMX you can grab the BrokerViewMBean http://activemq.apache.org/maven/activemqcore/apidocs/org/apache/activemq/broker/jmx/BrokerViewMBean.html and call one of the following methods removeQueue(String ...
Page:
How do I disable logging
How do I disable logging? See How do I change the logging
Page:
How do I disable persistence
three main ways to disable persistence, such as for unit testing JMS code # Set the NONPERSISTENT message delivery flag on your MessageProducer # Set the persistent=false flag in the <broker/> element of the Xml Configuration or on the property BrokerService http://incubator.apache.org/activemq/maven ...
Page:
How do I edit the website
website is all contained on a Wiki so that anyone can contribute Contributing How to edit You can also click the edit button when viewing the website which is located on the bottom of each page. We have been attacked by spammers ...
Page:
How do I embed a Broker inside a Connection
many messaging topologies there are JMS Brokers (server side) and a JMS client side. Often it makes sense to deploy a broker within your JVM. This allows you to optimise away a network hop; making the networking of JMS as efficient as pure RMI ...
Page:
How do I enable asynchronous sending
default setting for ActiveMQ is that all persistent messages outside of a transaction are sent to a broker are synchronous. This means that the send method is blocked until the message is received by the broker, its then written to disk then a response is returned to the client and the send() unblocks with success or throws a JMSException ...
Page:
How do I enable debug logging
How do I enable debug logging? For background see How do I change the logging. You can enable debug logging in ActiveMQ by adding the following line to the {{conf/log4j.properties}} file log4j.logger.org.apache.activemq=DEBUG
Page:
How do I find the Size of a Queue
How do I check on the size of the queue? I know it's not JMS standard, but most JMS implementations have a way to do this. You can view the queue depth using the MBeans in ActiveMQ 4.x. Use any JMX management console ...
Page:
How do I get started with JMS
How do I get started with JMS Your best way to get started understanding the JMS API is Sun's JMS tutorial http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS.html#wp84181. Alternatively you could stick to writing business ...
Page:
How do I make messages durable
Durability of messages is defined by the MessagerProducer http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html. You can explicitly configure the durability via the setDeliveryMode() method http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html#setDeliveryMode(int). e.g. MessageProducer ...
Page:
How do I preserve order of messages
ActiveMQ will preserve the order of messages sent by a single producer to all consumers on a topic. If there is a single consumer on a queue then the order of messages sent by a single producer will be preserved as well. If you have multiple consumers on a single queue the consumers will compete for messages and ActiveMQ ...
Page:
How do I purge a queue
frequent requirement is to purge a queue (i.e. delete all the messages on it). Solution You can use the Web Console to view queues, add/remove queues, purge queues or delete/forward individual messages. Another option is to use JMX to browse ...
Page:
How do I restart embedded broker
Pure restart of the embedded broker is not advisable, since it's state could be corrupted. Therefore, you're advised to instantiate the broker again before restarting it. BrokerService service = BrokerFactory.createBroker("xbean:activemq.xml"); service.start(); service.waitUntilStarted(); service.stop(); service.waitUntilStopped(); service = BrokerFactory.createBroker("xbean:activemq.xml ...
Page:
How do I restrict connections from creating new queues or topics
How do I restrict connections from creating new queues or topics? As is described in How do I create new destinations there is no need to create all the destinations up front, you can let the broker create them on the fly ...
Page:
How do I run a broker
ActiveMQ 3.x/4.x Please see the running a broker page Run Broker
Page:
How do I run ActiveMQ under the Kaffe JVM
ActiveMQ will run under Kaffe with a few adjustments to the default configuration. We have found the Kaffe does not properly implement: File based NIO Multicast Sockets JMX connector JNDI handling Therefore, the default ActiveMQ configuration must be adjusted ...
Page:
How do I send messages to different Destinations from a single MessageProducer
How do I send messages to different Destinations from a single MessageProducer? Create the MessageProducer using a null destination; then specify the destination each time you send... MessageProducer producer = session.createProducer(null); ... producer.send(someDestination, message); ... producer.send(anotherDestination ...
Page:
How do I set the message expiration
JMSExpiration on a message is set by the MessageProducer in JMS either via producer.setTimeToLive() http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html#setTimeToLive(long) producer.send(Destination, Message, int, int, long) http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageProducer.html ...
Page:
How do I turn off creating an embedded ActiveMQ broker when using the VM transport?
You can turn off auto creation by setting the create property on the VM Transport to false: ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?create=false
Page:
How do I unack the message with Stomp
explicit "unack" command in Stomp. Once the client receives the message it cannot be marked as "unconsumed" and sent to another subscriber (or redelivered to the same subscriber again). It's up to your application (or Stomp client) to handle failed processing of received messages and implement "message ...
Page:
How do I use ActiveMQ using in JVM messaging
ActiveMQ 3.x/4.x To use pure inmemory messaging you just need to set the broker URL to be vm://localhost Actually you can use any text after vm:// so that you can segment multiple logical JMS ...
Page:
How do I use Ivy with ActiveMQ
ivyconf> <!loads properties file as ivy variables, 0..n> <properties file="$ /ivyconffile.properties" /> <!configures ivy with some defaults, 0..1> <conf defaultResolver="localChain" checkUpToDate="false" /> <!typedef:defines new types in ivy> <!lateststrategies: defines latest ...
Page:
How do I use JMS efficiently
How do I use JMS efficiently? JMS is designed for high performance. In particular its design is such that you are meant to create a number of objects up front on the startup of your application and then resuse them throughout your application. e.g. its ...
Page:
How do I use log4j JMS appender with ActiveMQ
Log4j JMS appender http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/JMSAppender.html can be used to send your log messages to JMS broker. To use ActiveMQ as a destination of your messages, you need to configure JMS appender properly. The code sample ...
Page:
How do I use SSL
Setting up the Key and Trust Stores Also see Tomcat's SSL instructions http://jakarta.apache.org/tomcat/tomcat5.5doc/sslhowto.html for more info. The following was provided by Colin Kilburn. Thanks Colin! ActiveMQ includes key and trust stores that reference a dummy self ...
Page:
How do Message Groups compare to Selectors
Selectors are just filters. Message Groups are a way of grouping messages together to the same consumer to partition your application or insure ordering is maintained. Now you could implement message groups by hand, by having each consumer use its own ...
Page:
How do multiple transports work
ActiveMQ 3.x/4.x The transport a client uses to connect to the broker is just the transport your client uses. So messages the broker sends to your client will be sent over that transport. However the broker can support many transports. So client A could ...
Page:
How do transactions work
2 kinds of transaction support in ActiveMQ. JMS transactions the commit() / rollback() methods on a Session (which is like doing commit() / rollback() on a JDBC connection) XA Transactions where the XASession http://activemq.apache.org/maven/activemqcore/apidocs/org/apache/activemq ...
Page:
How does a Queue compare to a Topic
Topics In JMS a Topic implements publish and subscribe semantics. When you publish a message it goes to all the subscribers who are interested so zero to many subscribers will receive a copy of the message. Only subscribers who had an active subscription ...
Page:
How does ActiveMQ compare to AMQP
AMQP stands for the Advanced Message Queue Protocol and is a specification for how messaging clients and brokers can interoperate. AMQP is a specification of a wirelevel protocol for client to message broker communication. It is not a messaging system like ActiveMQ, but just a messaging protocol. ActiveMQ is aiming ...
Page:
How does ActiveMQ compare to Fuse Message Broker?
Fuse Message Broker http://fusesource.com/products/enterpriseactivemq/ is a certified distribution of Apache ActiveMQ provided by FuseSource. FuseSource http://fusesource.com does all of its development and bug fixes as part of the Apache ActiveMQ community, so there are no functional differences between ...
Page:
How does ActiveMQ compare to JBossMQ
some similarities between the two; they both support JMS 1.1 and run inside JBoss 4.x JBoss Integration. However ActiveMQ does offer some specific differences and advantages (at least from our perspective) ActiveMQ works great in any ...
Page:
How does ActiveMQ compare to Mantaray
We are obviously biased, and will tell you "just use ActiveMQ!" :) But Mantaray is an OK JMS provider. The interesting thing about MantaRay is it can support a peerbased network, just as ActiveMQ does with its peer transport Peer Transport Reference ...
Page:
How does ActiveMQ compare to Mule?
Apache ActiveMQ is a messaging provider, with extensive capabilities for message brokering. Mule is described as an ESB, in that it defines and executes the brokering of message exchanges among integrated software components. Architecture Mule provides an accessible programming model for integration, designed ...
Page:
How does ActiveMQ compare to Spread Toolkit
Spread Toolkit is a C library for messaging and only has partial support for JMS http://www.spread.org/JMS4Spread/docs/. It doesn't support durable messaging, transactions, XA or full JMS 1.1. It is also dependent on a native code Spread daemon running on the machine ...
Page:
How does ConnectionFactory relate to the Broker
How does ConnectionFactory relate to the Broker? The ConnectionFactory is a JMS specification client side interface for creating connections to a JMS broker. The Broker is a service on the network or embedded in the same JVM How do I embed a Broker inside a Connection which provides ...
Page:
How does JMS compare with email
Certainly they both do similar things. The main difference between them is their history and design criteria. JMS has a bunch of different qualities of service (durable v nondurable, queue v topic) designed for very high performance messaging with low ...
Page:
How does journaling work with multiple brokers
Brokers cannot share a journal. Each must be configured with it's own journal
Page:
How does OpenWire compare to Stomp
OpenWire is the native protocol that Apache ActiveMQ uses. It is designed for performance and size on the wire sacrificing some ease of implementation with higher performance and reduced network bandwidth as a priority. OpenWire was first released in Apache ActiveMQ 4.0. Stomp is a simpler text based ...
Page:
How does the journal work
See the description here Persistence
Page:
How does the website work
website is actually rendered from the Wiki contents that you can edit How do I edit the website. When viewing a page on the static HTML website you can click on the edit link (bottom of the page) and you can edit ...
Page:
How does XBean compare to Spring 2
Spring 2.0 has introduced the ability to handle custom XML languages inside the spring.xml. This is something we developed XBean http://geronimo.apache.org/xbean/ for way back in the Spring 1.x days. The Spring hook requires component developers to write their own ...
Page:
How fast is ActiveMQ
How fast is ActiveMQ? It all depends on the configuration, the operating system, hardware, JVM, JVM configuration and what you're doing. For more details see Performance
Page:
How lightweight is sending a message
ActiveMQ 3.x/4.x It depends :) If you are in a JMS transaction, are using nondurable messaging then its fairly lightweight and fast typically just blocking until the message has got onto the socket buffer. Though if you are using durable messaging and not using JMS ...
Page:
How should I implement request response with JMS
How should I implement request response with JMS? The simplest solution is to use Camel as a Spring Remoting provider http://activemq.apache.org/camel/springremoting.html which allows you to hide all the JMS API from your business logic and letting ...
Page:
How should I package applications using Camel and ActiveMQ
How should I package applications using Camel and ActiveMQ So you may wish to use Camel's Enterprise Integration Patterns inside the ActiveMQ Broker. In which case the stand alone broker is already packaged to work with Camel out ...
Page:
How should I use the VM transport
ActiveMQ 3.x/4.x Using the VM transport How do I use ActiveMQ using in JVM messaging to connect to an inJVM broker is the fastest and most efficient transport you can use. This is because by default there is no serialization to a socket or operating system ...
Page:
How to configure a new database
ActiveMQ explicity supports Derby, Axion, HSQL, Oracle, and SQLServer. Below are the steps on how to configure a new database. 1. Modify activemq.xml found in the directory "activemqhome/conf" by editing or adding a JDBC DataSource Configuration. e.g. <bean id="mysqlds ...
Page:
How to deploy activemq-ra-version.rar to weblogic
guide on how to deploy ActiveMQ's resouce adapter to weblogic 9.1. # Create a new domain in weblogic using the configuration wizard (Start menu BEA Products \> Tools \> configuration Wizard ). # Add the jar dependencies (these are the jars inside the rar file..for some ...
Page:
How to disable multicast discovery?
default, the ActiveMQ xml configuration Xml Configuration includes the multicast discovery Discovery mechanism. The tcp transport connector advertises its self using multicast and a multicast network connector is configured to listen to the same address. In this way, all brokers that share ...
Page:
How to unit test JMS code
When unit testing code with JMS you'll typically want to avoid the overhead of running separate proceses; plus you'll want to increase startup time as fast as possible as you tend to run unit tests often and want immediate feedback ...
Page:
How you can help release
How to Help Everyone in the ActiveMQ community can help with releases; users, developers, commmiters are all encouraged to test out a release and post any comments to the activemqdev@ mailing list Mailing Lists or create a JIRA https://issues.apache.org/activemq/browse ...
Page:
HTTP and HTTPs Transports Reference
HTTP and HTTPS Transports The HTTP and HTTPS transports are used to tunnel over HTTP or HTTPS using XML payloads. This allows the ActiveMQ client and broker to tunnel over HTTP avoiding any firewall issues. If the client is not JMS you might want ...
|