We are now ready to move on from the example seen in Chapter 1, Getting Started with HornetQ, which used JMS to create and consume messages. We will re-code the same example using the core API. We will then code a message producer and a message consumer that will push/read ECG signals using core API messages to a HornetQ standalone non-clustered server. We will not cover the MongoDB interaction; that will be left to the willing reader as an exercise—it is only a simple refactor of the code we have seen in Chapter 1, Getting Started with HornetQ.
We will try to get only one connection object that is charged with connecting to the HornetQ standalone non-clustered server that is running on our test environment. Even the session that is shared between the consumer client and the producer client will be created with only one object.
Finally, we will detail how to code the message producer and the message consumer. If you use the core API objects, you will see that...