Instant Apache Activemq Messaging Application Development How To -

Create a new Maven project (or a single module). Here is the pom.xml you need—nothing more, nothing less.

String failoverUrl = "failover:(tcp://localhost:61616)?initialReconnectDelay=100&maxReconnectAttempts=10"; ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(failoverUrl); Create a new Maven project (or a single module)

import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; import javax.jms.MessageConsumer; import javax.jms.Session; import javax.jms.TextMessage; To begin development

Apache ActiveMQ is a premier open-source message broker that facilitates asynchronous communication between distributed applications . Based on Tim Bish's guide, Create a new Maven project (or a single module)

// 4. Create a Destination (Queue or Topic) Destination destination = session.createQueue(QUEUE_NAME);

To begin development, you need a running broker and a configured project.

private static final String BROKER_URL = "tcp://localhost:61616"; private static final String QUEUE_NAME = "example.queue";