Book Image

Mastering JBoss Enterprise Application Platform 7

By : Francesco Marchioni, Luigi Fugaro
Book Image

Mastering JBoss Enterprise Application Platform 7

By: Francesco Marchioni, Luigi Fugaro

Overview of this book

The JBoss Enterprise Application Platform (EAP) has been one of the most popular tools for Java developers to create modular, cloud-ready, and modern applications. It has achieved a reputation for architectural excellence and technical savvy, making it a solid and efficient environment for delivering your applications. The book will first introduce application server configuration and the management instruments that can be used to control the application server. Next, the focus will shift to enterprise solutions such as clustering, load balancing, and data caching; this will be the core of the book. We will also discuss services provided by the application server, such as database connectivity and logging. We focus on real-world example configurations and how to avoid common mistakes. Finally, we will implement the knowledge gained so far in terms of Docker containers and cloud availability using RedHat's OpenShift.
Table of Contents (20 chapters)
Mastering JBoss Enterprise Application Platform 7
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface

Routing messages to other destinations


A common use case for messaging systems is to route messages to other destinations or servers. ActiveMQ Artemis offers the following options:

  • Divert messages from one destination to another on the same server

  • Bridge messages between two JMS Brokers

Although both options can be used for the same purpose, the difference between them is that a Bridge implies a connection between two ActiveMQ Artemis servers, whilst a message Divert operates on the same ActiveMQ Artemis server.

Diverting messages to other destinations

So basically diverting is used for internal routing. With this in mind, diverting can be very helpful if you want to change the body of a message. It can also apply filters to messages and add some transformation by delegating all the transformations to a class.

Once the messages are selected they can be diverted to other destinations.

A divert to get in action needs the following mandatory attributes:

  • routing­name: This is the name associated with...