(Spring batch) Pollable channel with replies contains ChunkResponses even if JOB is succefully completed -
i have following chunk writer configuration getting replies spring batch remote chunking:
<bean id="chunkwriter" class="org.springframework.batch.integration.chunk.chunkmessagechannelitemwriter" scope="step"> <property name="messagingoperations" ref="messaginggateway" /> <property name="replychannel" ref="masterchunkreplies" /> <property name="throttlelimit" value="5" /> <property name="maxwaittimeouts" value="30000" /> </bean> <bean id="messaginggateway" class="org.springframework.integration.core.messagingtemplate"> <property name="defaultchannel" ref="masterchunkrequests" /> <property name="receivetimeout" value="2000" /> </bean> <!-- remote chunking replies slave --> <jms:inbound-channel-adapter id="masterjmsreplies" destination="remotechunkingrepliesqueue" connection-factory="remotechunkingconnectionfactory" channel="masterchunkreplies"> <int:poller fixed-delay="10" /> </jms:inbound-channel-adapter> <int:channel id="masterchunkreplies"> <int:queue /> <int:interceptors> <int:wire-tap channel="loggingchannel"/> </int:interceptors> </int:channel> my remotely chunked step running perfectly, data processed performance, steps ends in completed state. problem masterchunkreplies queue channel contains chunkresponses after end of job. documentation doesn't it, normal state?
problem can't run new job then, because crashes at:
message contained wrong job instance id [" + jobinstanceid + "] should have been [" + localstate.getjobid() + "]." there simple workaround, cleaning masterchunkreplies queue channel @ start of job, i'm not sure if correct...
can please clarify this?
gary, found root cause.
at slaves, if change following chunk consumer jms adapter:
<jms:message-driven-channel-adapter id="slaverequests" connection-factory="remotechunkingconnectionfactory" destination="remotechunkingrequestsqueue" channel="chunkrequests" concurrent-consumers="10" max-concurrent-consumers="50" acknowledge="transacted" receive-timeout="5000" idle-task-execution-limit="10" idle-consumer-limit="5" /> for
<jms:inbound-channel-adapter id="jmsrequests" connection-factory="remotechunkingconnectionfactory" destination="remotechunkingrequestsqueue" channel="chunkrequests" acknowledge="transacted" receive-timeout="5000" > <int:poller fixed-delay="100"/> </jms:inbound-channel-adapter> then works, masterchunkreplies queue consumed @ end of job. anyway, attempts of consuming chunkrequests @ slaves in parallalel doesn't work. masterchunkreplies queue contains not consumed chunkresponses. starting new jobs ends in
message contained wrong job instance id [" + jobinstanceid + "] should have been [" + localstate.getjobid() + "]." gary, mean slaves cannot consume chunkrequests in parallel?
Comments
Post a Comment