Have a look at sendFailIfNoSpace property as part of configuring ProducerFlowControl. http://activemq.apache.org/producer-flow-control.html
- Limiting the size of a queue igrahami
- Re: Limiting the size of a queue Torsten Mielke
- Re: Limiting the size of a queue igrahami