相关文章推荐
旅途中的西装  ·  Dart ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have the following exception:

    INFO 2015-01-19 11:00:00 [AbstractCorrelatingMessageHandler] - Expiring MessageGroup with correlationKey[aa7eb738-b47e-3bbe-8aca-282453ae5b29]
ERROR 2015-01-19 11:00:00 [JdbcMessageStore] - Exception in expiry callback
org.springframework.integration.MessageDeliveryException: Dispatcher has no subscribers for channel 'org.springframework.context.support.ClassPathXmlApplicationContext@19e0ff2f.SIEBELDOC_PARK_after_aggregation'.
        at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:81)
        at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:181)
        at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:330)
        at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:169)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.sendReplyMessage(AbstractCorrelatingMessageHandler.java:436)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.sendReplies(AbstractCorrelatingMessageHandler.java:429)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.completeGroup(AbstractCorrelatingMessageHandler.java:404)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.completeGroup(AbstractCorrelatingMessageHandler.java:389)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.expireGroup(AbstractCorrelatingMessageHandler.java:371)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.forceComplete(AbstractCorrelatingMessageHandler.java:308)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler.access$000(AbstractCorrelatingMessageHandler.java:71)
        at org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler$1.execute(AbstractCorrelatingMessageHandler.java:137)
        at org.springframework.integration.store.AbstractMessageGroupStore.expire(AbstractMessageGroupStore.java:117)
        at org.springframework.integration.store.AbstractMessageGroupStore.expireMessageGroups(AbstractMessageGroupStore.java:87)
        at org.springframework.integration.store.MessageGroupStoreReaper.run(MessageGroupStoreReaper.java:115)
        at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

That's the flow:

<int:channel id="SIEBELDOC_PARK_job_Channel"/>
<int:channel id="SIEBELDOC_PARK_after_split"/>
<int:channel id="SIEBELDOC_PARK_after_aggregation"/>
<int:inbound-channel-adapter channel="SIEBELDOC_PARK_job_Channel" expression="@parkingGetItems.getItems('SIEBELDOC_PARK')">
    <int:poller fixed-rate="${fdl.db.item.polling.rate}"/>
</int:inbound-channel-adapter>
<int:splitter input-channel="SIEBELDOC_PARK_job_Channel" output-channel="SIEBELDOC_PARK_after_split"/>
    <int:aggregator input-channel="SIEBELDOC_PARK_after_split" output-channel="SIEBELDOC_PARK_after_aggregation" message-store="SIEBELDOC_PARK_messageStore"
        ref="parkingStackMessageAggregator" method="aggregate"
        correlation-strategy="parkingStackMessageAggregator"
        correlation-strategy-method="correlate"
        release-strategy="parkingStackMessageAggregator"
        release-strategy-method="release"
        send-partial-result-on-expiry="true"
        expire-groups-upon-completion="true"
    </int:aggregator>
<int:chain id="jobexecutor" input-channel="SIEBELDOC_PARK_after_aggregation" >
    <int:transformer>
        <bean class="hu.telekom.fdl.job.IntegrationMessageToJobRequest"/>
    </int:transformer>
    <int:service-activator>
        <bean class = "hu.telekom.fdl.job.JobLaunchMessageHandler"/>
    </int:service-activator>
</int:chain>

I'm using the following reaper and messagestore code:

<int-jdbc:message-store id="SIEBELDOC_PARK_messageStore" region="SIEBELDOC_PARK_GRP" data-source="jobRepoDataSource" table-prefix="INT_" lob-handler="lobHandler"/>
<bean id="SIEBELDOC_PARK_messageStoreReaper" class="org.springframework.integration.store.MessageGroupStoreReaper">
    <property name="messageGroupStore" ref="SIEBELDOC_PARK_messageStore" />
    <property name="timeout" value="100000" />
</bean>
<task:scheduled-tasks>
    <task:scheduled ref="SIEBELDOC_PARK_messageStoreReaper" method="run" cron="* */30 * * * ?"/>
</task:scheduled-tasks>     

Can you give me advices what could be the problem? Thanks,

For me the channel name: org.springframework.context.support.ClassPathXmlApplicationContext@19e0ff2f.SIEBELDOC_PARK_after_aggregation is also strange for me. The original channel name is: SIEBELDOC_PARK_after_aggregation which is not the same as the channel name referred in the stacktracce.

Ferenc

What did you try so far ? We are not here to make your homework, so please show us that you tried something ;) – mithrop Jan 19, 2015 at 11:57 Hm? You can see what I tried so far :) As You can se the 'SIEBELDOC_PARK_after_aggregation' has subscriber It's a chain. So I don't understand why It's saying there is no subscriber – Ferenc Turi Jan 19, 2015 at 11:59
  • org.springframework.context.support.ClassPathXmlApplicationContext@19e0ff2f.SIEBELDOC_PARK_after_aggregation is a result of AbstractMessageChannel#getFullChannelName(). As you see we include there an ApplicationContext id.

  • I may guess, but would be better if you remove that jobexecutor id from the <chain>. There might be another bean in the ctx with the same id. No ?

  • How does it work if you just send messages to the aggregator for regular releasing? Don't you see the same MessageDeliveryException ?

  • Hi, you are right. I have found 4 different flows with the same 'jobexecutor' chain id in it. I have to do some test for answering that was the problem or not. – Ferenc Turi Jan 19, 2015 at 12:27

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.