If you ever need to do some data processing outside the scope of the web’s request/response, look no further than the Message Bus. It’s conceptually similar to Java Messaging Service (JMS) Topics, but sacrifices transactional, reliable delivery capabilities, making it much lighter-weight. Liferay Portal uses Message Bus all over the place:

  • Auditing
  • Search engine integration
  • Email subscriptions
  • Monitoring
  • Document Library processing
  • Background tasks
  • Cluster-wide request execution
  • Clustered cache replication

You can use it too! Here are some of Message Bus’s most important features:

  • publish/subscribe messaging
  • request queuing and throttling
  • flow control
  • multi-thread message processing

There are also tools, such as the Java SE’s JConsole, that can monitor Message Bus activities.


Figure 1: JConsole shows statistics on Message Bus messages sent, messages pending, and more.

The Message Bus topics are covered in these tutorials:

Since all messages are sent to and received at destinations, messaging destinations is worth exploring first.

Messaging Destinations

In Message Bus, you send messages to destinations. A destination is a named logical (not physical) location. Sender classes send messages to destinations, while listener classes wait to receive...

Read More

Message Listeners

If you’re interested in messages sent to a destination, you need to “listen” for them. That is, you must create and register a message listener for the destination. To create a message listener,...

Read More

Sending Messages

Message Bus lets you send messages to destinations that have any number of listening classes. As a message sender you don’t need to know the message recipients. Instead, you focus on creating...

Read More
0 (0 Votes)
Data Scopes Previous