activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Unable to create MessageProducer
Date Mon, 12 Nov 2007 17:22:13 GMT

>"Its normally a glitch in the network - or that the broker died." : 
I'm pretty sure the broker was OK since a new client could get a connection
& session and create a temp queue. I previously registered another query (
here ) regarding using VM style and temp queues getting deleted so this is
why we began using tcp style on server side.....

>"This is an inefficient way of using JMS should try pool
producers if you can.":

Yes I was reading that but was wondering what is a ballpark figure to start
with for pooling e.g. 10 sessions & 10 producers (I realise its not possible
to accurately w/o application knowledge but a best guess would be
appreciated since they are heavy objects to create...?)

>"Failover causes the client to reconnect to the broker if the socket
Regarding where the failover syntax is needed, is this required in the
transportConnector part of the activeMQ.xml or server side, or just the
client i.e. as part of the
org.apache.activemq.ActiveMQConnectionFactory.brokerURL for the


James.Strachan wrote:
> On 12/11/2007, TOPPER_HARLEY <> wrote:
>> >"It could just be the socket has been dropped.":
>> Is socket dropping a common occurence or simply related to the quality of
>> the network one is running on (my TCP level knowledge isn't great).
> Its normally a glitch in the network - or that the broker died.
>> Would
>> vm: style for the brokerURL prevent this since it would be insice JVM?
> Yes
>> This is our setup:
>> We have a number of predefined topics which we use when broadcasting
>> updates
>> and number temp queues for direct request/responses communication (one
>> for
>> each of our clients). We maintain one connection on the server side and
>> as
>> we send data from different threads, we cache a threadlocal session
>> object
>> (since ActiveMQSession is for single thread use). For each individual
>> message send, we create and destroy a MessageProducer based on the
>> destination as follows:
>> try {
>>       // Thread local retrieval
>>       final Session session = this.getSession();
>>       producer = session.createProducer(destination);
>>       producer.send(message);
>> } finally {
>>      if (producer != null) {
>>          try {
>>              producer.close();
>>          } catch (final JMSException e) {
>>                  e.printStackTrace();
>>          }
>>       }
>> }
> This is an inefficient way of using JMS BTW...
> you should try pool producers if you can.
>> >"You night wanna enable failover...":
>> We have only been assigned one port for the broker (specified obviously
>> as
>> part of the brokerURL property) so I dont know if failover can assist us:
> Failover causes the client to reconnect to the broker if the socket dies.
>>  my
>> understanding of failover is that you need more than one URI and AMQ
>> switches to another one if one broker goes down:
> Not true - it works fine with a single broker URI
> -- 
> James
> -------
> Open Source SOA

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message