You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by saran_kct <sa...@yahoo.co.in> on 2013/10/14 17:38:53 UTC

Camel JMS Container sending 1000's of ping like messages in a minute to IBM MQ

I am using Camel v2.6.0,Spring v2.5.6 on JBoss 4.3.0,Jdk 1.5 to listen to
messages hosted on an IBM MQ. A channel is created on the IBM MQ for this.
My MQ Admin is complaining that 1000's of ping like messages are sent to
this Channel from my application even though there is no real data posted to
the MQ's my application is listening too. Below is my configuration. Please
let me know what is missing here.

<bean id="ibmmq" class="org.apache.camel.component.jms.JmsComponent">
    <property name="configuration" ref="providerJMSConfig" />
    <property name="connectionFactory" ref="ucConnectionFactory" />
</bean>

<bean id="ucConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
    <property name="targetConnectionFactory" ref="mqconfactory"/>
    <property name="username" value="${username}"/>
    <property name="password" value="${password}"/>
 </bean>


<bean id="mqconfactory" class="com.ibm.mq.jms.MQConnectionFactory">
    <property name="transportType">
        <util:constant
static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ" />
    </property>

    <property name="queueManager" value="${queueManager}" />
    <property name="hostName" value="${hostName}" />
    <property name="port" value="${port}" />
    <property name="channel" value="${channel}" /> 

</bean>

<bean id="providerJMSConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
    <property name="requestTimeout" value="80000" />
    <property name="useMessageIDAsCorrelationID" value="true" />
    <property name="disableReplyTo" value="true" />
</bean>

    <route id="routeFromMQToUploadDocumentProcessorSvc" autoStartup="true">
                <from
uri="ibmmq:queue:CCGD.DDCTM.IN?transacted=true&amp;maxConcurrentConsumers=2"
/>
        <process ref="uploadDocumentProcessor"/>
    </route>

    <route id="routeFromMQToSqlUpdateSucess">
        <from
uri="ibmmq:queue:CCGD.DDCTM.IN2?transacted=true&amp;maxConcurrentConsumers=2"
/>
        <process ref="sqlProcessor"/>
        <to uri ="sql:mysql goes here />                            

    </route>





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-Container-sending-1000-s-of-ping-like-messages-in-a-minute-to-IBM-MQ-tp5741547.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel JMS Container sending 1000's of ping like messages in a minute to IBM MQ

Posted by saran_kct <sa...@yahoo.co.in>.
Any help with this issue is much appreciated

Thanks
Saran



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-Container-sending-1000-s-of-ping-like-messages-in-a-minute-to-IBM-MQ-tp5741547p5741561.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel JMS Container sending 1000's of ping like messages in a minute to IBM MQ

Posted by Claus Ibsen <cl...@gmail.com>.
Ad 2)
You can read about receiveTimeout in spring jms documentation as well,
as camel-jms is built on top of spring jms. So the option is from
spring.

Its default 1000 (eg 1 sec).

On Tue, Oct 15, 2013 at 9:41 PM, saran_kct <sa...@yahoo.co.in> wrote:
> Thank You Claus. I tried setting that option, no luck. I have 2 questions
>
> 1) JMS Connection Pool - Is there any reference documentation that you can
> point me to set this up in Camel - Spring - IBM MQ
>
> 2) I tried setting
> ibmmq://queue:CCGD.DDCTM.IN2?*cacheLevelName=CACHE_CONSUMER*&maxConcurrentConsumers=2&transacted=true,
> no luck. But we noticed it was less chatty when we set
>
> ibmmq://queue:CCGD.DDCTM.IN2?*receiveTimeout=300000*&maxConcurrentConsumers=2&transacted=true
>
> I am not sure of the impact of receiveTimeout attribute.
> http://camel.apache.org/jms says "The timeout for receiving messages (in
> milliseconds).", I am not understanding what this means. I also noticed
> that, when I undeployed my application after adding receiveTimeout=300000 -
> it took a while ( > 2 mins )for the camel context to shutdown. Before this
> attribute - it was immediate.
>
> Thanks for your time!
>
> Thanks
> Saran
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-Container-sending-1000-s-of-ping-like-messages-in-a-minute-to-IBM-MQ-tp5741547p5741617.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Camel JMS Container sending 1000's of ping like messages in a minute to IBM MQ

Posted by saran_kct <sa...@yahoo.co.in>.
Thank You Claus. I tried setting that option, no luck. I have 2 questions

1) JMS Connection Pool - Is there any reference documentation that you can
point me to set this up in Camel - Spring - IBM MQ

2) I tried setting
ibmmq://queue:CCGD.DDCTM.IN2?*cacheLevelName=CACHE_CONSUMER*&maxConcurrentConsumers=2&transacted=true,
no luck. But we noticed it was less chatty when we set

ibmmq://queue:CCGD.DDCTM.IN2?*receiveTimeout=300000*&maxConcurrentConsumers=2&transacted=true

I am not sure of the impact of receiveTimeout attribute.
http://camel.apache.org/jms says "The timeout for receiving messages (in
milliseconds).", I am not understanding what this means. I also noticed
that, when I undeployed my application after adding receiveTimeout=300000 -
it took a while ( > 2 mins )for the camel context to shutdown. Before this
attribute - it was immediate.

Thanks for your time!

Thanks
Saran



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-Container-sending-1000-s-of-ping-like-messages-in-a-minute-to-IBM-MQ-tp5741547p5741617.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel JMS Container sending 1000's of ping like messages in a minute to IBM MQ

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Have you tried with a jms connection pool. And if you are not using XA
transactions then you can likely set cacheLevelName=CACHE_CONSUMER.
This would speedy things and avoid chatty io.

See more details at: http://camel.apache.org/jms



On Mon, Oct 14, 2013 at 5:38 PM, saran_kct <sa...@yahoo.co.in> wrote:
> I am using Camel v2.6.0,Spring v2.5.6 on JBoss 4.3.0,Jdk 1.5 to listen to
> messages hosted on an IBM MQ. A channel is created on the IBM MQ for this.
> My MQ Admin is complaining that 1000's of ping like messages are sent to
> this Channel from my application even though there is no real data posted to
> the MQ's my application is listening too. Below is my configuration. Please
> let me know what is missing here.
>
> <bean id="ibmmq" class="org.apache.camel.component.jms.JmsComponent">
>     <property name="configuration" ref="providerJMSConfig" />
>     <property name="connectionFactory" ref="ucConnectionFactory" />
> </bean>
>
> <bean id="ucConnectionFactory"
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
>     <property name="targetConnectionFactory" ref="mqconfactory"/>
>     <property name="username" value="${username}"/>
>     <property name="password" value="${password}"/>
>  </bean>
>
>
> <bean id="mqconfactory" class="com.ibm.mq.jms.MQConnectionFactory">
>     <property name="transportType">
>         <util:constant
> static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ" />
>     </property>
>
>     <property name="queueManager" value="${queueManager}" />
>     <property name="hostName" value="${hostName}" />
>     <property name="port" value="${port}" />
>     <property name="channel" value="${channel}" />
>
> </bean>
>
> <bean id="providerJMSConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>     <property name="requestTimeout" value="80000" />
>     <property name="useMessageIDAsCorrelationID" value="true" />
>     <property name="disableReplyTo" value="true" />
> </bean>
>
>     <route id="routeFromMQToUploadDocumentProcessorSvc" autoStartup="true">
>                 <from
> uri="ibmmq:queue:CCGD.DDCTM.IN?transacted=true&maxConcurrentConsumers=2"
> />
>         <process ref="uploadDocumentProcessor"/>
>     </route>
>
>     <route id="routeFromMQToSqlUpdateSucess">
>         <from
> uri="ibmmq:queue:CCGD.DDCTM.IN2?transacted=true&maxConcurrentConsumers=2"
> />
>         <process ref="sqlProcessor"/>
>         <to uri ="sql:mysql goes here />
>
>     </route>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-Container-sending-1000-s-of-ping-like-messages-in-a-minute-to-IBM-MQ-tp5741547.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen