spring integration - parallely processing the messages from a queue -
i have below program consumes messages queue , queue tibco queue , trying develop utility lets situation comes in external application sends lots of messages on queue example somewhere around 20,000 messages in day have legacy code written in java simple consumes messages , write file named messagesday.txtand write messages of queue in file , store in c drive of computer
now want enhance this legacy utility takes lots of time in consuming messages have chosen spring integration in technology , in spring integration have come below on xml in consuming messages queue rite now
plese advise how can add concurrent consumers in multiple consumers can listen same queue @ time , write messages of queue text file , save in c drive of computer
folks please advise
<int:channel id="output" > </int:channel> <bean id="tibcoemsjnditemplate" class="org.springframework.jndi.jnditemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">com.tibco.tibjms.naming.tibjmsinitialcontextfactory</prop> <prop key="java.naming.provider.url">tcp://ftr.net:7833</prop> <prop key="java.naming.security.principal">rtey</prop> <prop key="java.naming.security.credentials">rtey</prop> </props> </property> </bean> <bean id="tibcoemsconnfactory" class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jnditemplate"> <ref bean="tibcoemsjnditemplate" /> </property> <property name="jndiname"> <value>genericconnectionfactory</value> </property> </bean> <bean id="tibcosendjmstemplate" class="org.springframework.jms.core.jmstemplate"> <property name="connectionfactory"> <ref local="tibcoemsconnfactory" /> </property> <property name="defaultdestinationname"> <value>rtey.dev.queue.test.data</value> </property> <property name="pubsubdomain"> <value>false</value> </property> <property name ="receivetimeout"> <value>120000</value> </property> </bean> <int:channel id="input"> <int:queue capacity="10"/> </int:channel> <jms:outbound-channel-adapter channel="input" destination-name="rtey.dev.queue.test.data" connection-factory="tibcoemsconnfactory" /> <jms:message-driven-channel-adapter channel="output" destination-name="rtey.dev.queue.test.data" connection-factory="tibcoemsconnfactory" /> </beans>
Comments
Post a Comment