In this recipe, we will learn how to produce and consume a JMS queue message. We will use two little applications, one that produces messages, and another one that consumes messages.
To get started, let's first create an
adhoc
folder to run our WildFly. In a terminal window enter the following commands:$ cd $WILDFLY_HOME $ cp -a standalone jms-std-node-2
In this recipe, we will need an application to test our configuration. For this recipe, we will need the applications named
jms-producer
andjms-consumer
, which you can find in my GitHub repository. If you skipped the Managing applications using the deployments folder recipe of Chapter 2, Running WildFly in Standalone Mode, please refer to it to download all the source code and projects that you will need.To build the application, enter the following commands:
$ cd $WILDFLY_HOME/github/wildfly-cookbook $ cd jms-producer $ mvn clean package
Now it's time to run our WildFly...