Event processing with topics (Simple)
In this recipe we will explore how to use JMS topics as event channels by looking at a sample stock price update service and a simple consumer of those events.
Getting ready
For this recipe we will use the examples named event-publisher
and event-subscriber
that implement a simple stock price ticker application.
How to do it...
To run the sample for this recipe you will need to perform the following steps:
- Open a terminal and start a broker.
- Open two more terminals, change to the directory where the
event-subscriber
file is located in each, and run the consumer by typingmvn compile exec:java
. (You can use Ctrl + C to terminate this application or it will stop on its own after five minutes.) - Open a fourth terminal, ...
Get Instant Apache ActiveMQ Messaging Application Development How-to now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.