activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <bruce.sny...@gmail.com>
Subject Re: ActiveMQ / JMS jam when message producer sends messages
Date Thu, 04 Mar 2010 01:27:31 GMT
On Wed, Mar 3, 2010 at 1:29 AM, aness123 <aness123@spam.la> wrote:
>
> Hi @ all,
>
> I'm using ActiveMQ 5.3.0 and Java Message Service to send and receive
> message to/from several queues. I wanna send 1000 messages and more by my
> program by using a MessageProducer. Unfortunately sending jams when I send
> more than 300 messages. My program does not continue anymore. Here is some
> code:
>
> Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
> final Queue queue = session.createQueue(queueNamePrefix +
> doc.getRootElement().getName());
> final MessageProducer producer = session.createProducer(queue);
> final TextMessage msg = session.createTextMessage(out.outputString(doc));
> producer.send(msg); //--> program jams here
>
> Does anyone have an idea? Thank you

Sounds like you are running into producer flow control:

http://activemq.apache.org/producer-flow-control.html

You can disable this using destination policies.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Mime
View raw message