# Lab 2: Integrate Amazon MQ ## Prerequisites You must have completed Lab 1 successfully. Each lab builds on the previous lab. Switch to the `router` directory in your Cloud 9 IDE. ``` cd ~/environment/amazon-mq-enterprise-integration-patterns/router ``` ## What are we doing? In this lab, we will be integrating AmazonMQ broker endpoints to our skeleton project. First we will add necessary dependencies to our project and then we will configure a route that just copies messages from one queue to another. ## Add dependencies Our project depends on various java libraries to run. These dependencies are managed by Maven. Add the following lines to ```pom.xml``` file in the `````` block. ``` org.apache.activemq activemq-camel 5.15.9 org.apache.activemq activemq-all 5.15.9 ``` ## Add ActiveMQ bean Add the following lines to ```router/src/main/resources/META-INF/spring/camel-context.xml``` under `````` ``` ``` ## Add a new route that uses the bean above Add the following lines to ```router/src/main/resources/META-INF/spring/camel-context.xml``` under `````` ``` ``` ## Run the project Now run the skeleton project using the following commands. ``` mvn install mvn camel:run ``` That's it for Lab 2. Now you can start [Lab 3](lab-3.md).