I have such simple class:

@Component
public class MessagesProducer {

        private String endpoint = "activemq:queue:myqueue";
        
        @EndpointInject
        ProducerTemplate producer;
                
        public void send(BodyAndHeaders bah) {
                Map<String, Object> headers = bah.getHeaders();
                // the faulty line:
                producer.sendBodyAndHeaders(endpoint, ExchangePattern.InOnly,
bah.getBody(), headers);
                // end of the faulty line
        }
}

*In the havy load tests came up that application stuck in line:
producer.sendBodyAndHeader(...);. 
I have no exceptions in logs, nothing. What could be the cause of that?*

My jms configuration:

        <bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" 
value="${application.activemq.broker}" />
        </bean>

        <bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
                init-method="start" destroy-method="stop">
                <property name="maxConnections" value="8" />
                <property name="idleTimeout" value="0" />
                <property name="connectionFactory" ref="jmsConnectionFactory" />
        </bean>

        <bean id="jmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
                <property name="connectionFactory" 
ref="pooledConnectionFactory" />
                <property name="concurrentConsumers" value="1" />
                <property name="transferException" value="true" />
                <property name="requestTimeout" value="150000" />
        </bean>

        <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
                <property name="configuration" ref="jmsConfig" />
        </bean>



--
View this message in context: 
http://camel.465427.n5.nabble.com/Application-stuck-in-ProducerTemplate-sendBodyAndHeaders-line-tp5746458.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to