activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JRR <...@cisco.com>
Subject Re: ActiveMQ-CPP Producer Flow Control Question
Date Mon, 09 Jul 2012 17:32:03 GMT
Hello Tim,

Thank you for the suggestion.  I made this change, but it doesn't quite
work. I did some investigation and it's an interesting scenario....


I extracted all of the AMQ code from the product into a small test program
so I
could more quickly and easily play with the settings. The test program
creates
a connection once, and then reuses the connection, building the session,
destination, message, producer, etc. on top of the connection for each
message.


When I change the URI to add '?connection.alwaysSyncSend=true', and then
cause
the application to run, it sends approximately 1400 message and then locks
up
(throttles indefinitely).


However, what I found is that if I run /another /instance of the application
in
another xterm, That new application */will/* get an exception when it
reaches the
producer.send() method -- as expected.


psbu-jrr-lnx[SUSE10.1]:162>  env NM_MSGS=100 simple_producer.exe
=====================================================
Starting the example:
-----------------------------------------------------
NM_MSGS set to 100
Starting Producer Thread 0x8072358
Creating connection for tcp://127.0.0.1:61616?connection.alwaysSyncSend=true
terminate called after throwing an instance of 'ee_except'
  what():  Error while sending message[*** BEGIN SERVER-SIDE STACK TRACE ***
Message: Usage Manager Temp Store is Full (01002026116f 1048576). Stopping
producer (ID:psbu-jrr-lnx-36396-1341854427427-0:0:0:0) to prevent flooding
queue://c.c.p.v.ms.events. See
http://activemq.apache.org/producer-flow-control.html for more info




Moreover, if I kill the original locked up process. All subsequent
invocations
of the process will now fail with the exception -- as expected.


My initial lockup problem remains. Can you provide any insights as to how to
avoid the lockup?


Also, I was able to add '?connection.alwaysSyncSend=true' to the URI, but I
would rather invoke the method
activemq::core::ActiveMQConnectionFactory::setAlwaysSyncSend(). However,
this
method doesn't exist for a cms::ConnectionFactory, which is what is returned
by
the static method 'createCMSConnectionFActory'. Is there a way to convert
from
a CMS connection factory to an AMQ connection factor? Or would this just be
a
matter of using the AMQ Connection Factory constructor instead?

Thanks in advance,

-=John


--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-CPP-Producer-Flow-Control-Question-tp4653781p4653805.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message