From the course: Spring: Messaging with JMS

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Register custom message listener with Spring

Register custom message listener with Spring - Spring Tutorial

From the course: Spring: Messaging with JMS

Start my 1-month free trial

Register custom message listener with Spring

- With that done, lets register our message listener in our JMS config class. We'll do this first by making our JMS config class as well implement another class. We'll have this implement the JMS listener configurer. This will as well, require us to implement some abstract methods. We'll implement the configure JMS listener. Before we implement this method, we're also gonna create another spring bean. We'll call this our bean, and this is gonna be for our book listener. We'll type book order processing message listener and we'll call this our JMS message listener. Will instantiate a book order processing message listener. We'll return the listener. With that done, let's turn our attention back to the method configure JSM listeners. What we're going to do is register a custom book order processing message listener. So, we're going to type, we're going to instantiate a simple JSM listener endpoint. We'll call this endpoint equals new simple JMS listener, and then we're going to set the…

Contents