Refactoring around the STOMP listener