Application testing using embedded brokers (Advanced)

In this recipe we are going to look at how you embed an ActiveMQ Broker right into your own applications.

Getting ready

For this recipe we will use the example application named embedded-broker to demonstrate embedded ActiveMQ Brokers. Before proceeding, you should ensure that there are no other broker instances running on your computer.

How to do it...

To run the sample for this recipe, open a terminal, change the path to the directory where embedded-broker is located, and run it by typing mvn compile exec:java.

In the terminal where you started the example, you will see output similar to the following snippet indicating that the application is running:

Starting the Embedded Broker example now... ...

Get Instant Apache ActiveMQ Messaging Application Development How-to now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.