That's a FAQ on hornetq's users forum...
HornetQ has different ways to deal with overflow of messages, protecting it from Out of Memory.
- Block upon overflow
- Flow to disk (as we call it.. paging)
- Dropping (messages will just disappear. only valid in cases where you can afford losing messages)
- Error (recently introduced on 2.4, 2.2 doesn't have this feature)
As you set the system to block, the client will wait upon credits that will only arrive after you consume messages.
So, either consume messages or set the address settings as paging.
Documentation about setting up paging:
http://docs.jboss.org/hornetq/2.4.0.beta1/docs/user-manual/html/paging.html#paging.main.config
Documentation about blocking mode:
http://docs.jboss.org/hornetq/2.4.0.beta1/docs/user-manual/html/paging.html#d0e5213