The following class handle the messages receive on a Rabbit MQ channel:
@RabbitListener(queues=RabbitMQConfiguration.QUOTE_REQUEST_QUEUE)
public class QuoteRequestHandler {
@Autowired
private SimpMessageSendingOperations messagingTemplate;
@RabbitHandler
public void handle(String request) {
QuoteChannelServiceImpl.getInstance(messagingTemplate);
}
}
I'd like to have access to SimpMessageSendingOperations
inside this class, but as it is not a spring bean, it'd be null. I'm wondering if there is a clean way to inject this dependency into this class.