Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Sending and receiving messages to/from a JMS queue destination


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.

Getting ready

  1. 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
  2. In this recipe, we will need an application to test our configuration. For this recipe, we will need the applications named jms-producer and jms-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.

  3. 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...