On Mon, Nov 23, 2009 at 1:35 PM, Ming Fang <[email protected]> wrote: > Thanks for looking into this problem. > > According to org.apache.camel.component.jms.JmsProducer.java line 76, > affinity = RequestorAffinity.PER_PRODUCER; > This is already the default. > > The problem is this case is that the physical connection under the Producer > changes if left idle for over 30 seconds. > org.apache.activemq.pool.PooledConnectionFactory.java line 105-112 > if (connection != null && connection.expiredCheck()) { > connection = null; > } > > if (connection == null) { > ActiveMQConnection delegate = createConnection(key); > connection = createConnectionPool(delegate); > } > > Perhaps this would be less of a problem is ActiveMQ has a way to change the > idle time. > I'm going to look into Jencks to see if that can workaround this problem. > Another workaround is to set randomize=false in the ActiveMQ failover > transport. > > But the fundamental problem remains... > How can the Requester ensure that it is using the same physical connection as > the Producer? >
Yeah I wonder if it should create both a - MessageProducer - MessageConsumer when the JmsProducer is sending an InOut message. Then use the created MessageConsumer to wait for the reply. I would then assume they both use the same connection? As they are created by the same Session. > > On Nov 23, 2009, at 6:13 AM, Claus Ibsen wrote: > >> Have you tried with the option >> replyToTempDestinationAffinity=producer > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
