That's more a spring question. I don't see anything specific to HornetQ here.
If you decide to use JMS.. there are tons of JMS examples on how to use a consumer.
Try to ask something more specific and we will try to help you.
1 of 1 people found this helpful
Check the classes SimpleMessageListenerContainer and DefaultMessageListenerContainer from the package org.springframework.jms.listener. There is a lot of documentation and examples for these Spring classes available on the internet.