Selecting messages (Simple)
Building on what we learned in the preceding recipe, we will modify our stock price consumer to use JMS selectors to filter the events it receives from the update service.
Getting ready
For this recipe we will use two examples. The first is event-producer
that we already saw in the last recipe, and the second is selective-event-consumer
that implements a simple stock price ticker application that uses JMS selectors to limit which stock price updates it receives.
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 a second terminal, change to the directory where the
selective-event-consumer
file is located, and run the consumer by typing ...
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.