Announcement Announcement Module
Collapse
No announcement yet.
'Dispatcher has no subscribers' - a bug or my own doing? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 'Dispatcher has no subscribers' - a bug or my own doing?

    I've been fighting this issue for 2 days now and am about to throw up my hands. I have a pretty substantial spring integration setup that I've created for a messaging system that we have. I got it about 80% done with ease (great framework) but this one 'route' I'm setting up is getting an error saying "org.springframework.integration.MessageDeliveryEx ception: Dispatcher has no subscribers". It only happens on our 'virtual catalog exclude' messages.

    I can take the <si-xml:xslt-transformer id="xsltTransformer_vcExcludes" out of the route by connecting the service-activator to xsltTransformer_vcExcludes rather than vcExcludesTransformerChannelOut and avoids the exception. I can also leave that in but go all the way back to the beginning of the route to the <si-xml:xpath-router input-channel="routerInChannel" and removing all but the virtualCatalog mapping and then removing all components of the context except as if to describe that the 'virtual catalog exclude' messages are the only ones that might ever come.
    It seems that the handlers for the <si-xml:xslt-transformer id="xsltTransformer_vcExcludes" are non-existent.

    Can anyone shed light on this. Did I stumble onto a bug? Is it something to do with having multiple routers and splitters in the route that buggers up the handler settings?

    Here's a message that causes the issue:

    Code:
    <virtualCatalog companyNumber="00072" >
      <exclude>
        <product code="061150140" categoryCode="DEFAULT___0000000000" />
        <product code="061150140" categoryCode="SPECIAL___0000000300" />
      </exclude>
    </virtualCatalog>
    Here's a message that works fine. The only difference is the include vs exclude:

    Code:
    <virtualCatalog companyNumber="00072" >
      <include>
        <product code="061150140" categoryCode="DEFAULT___0000000000" />
        <product code="061150140" categoryCode="SPECIAL___0000000300" />
      </include>
    </virtualCatalog>
    I have attached applicationContext.xml. (sorry its so big)

  • #2
    It could be a typo on a channel name; endpoints that use an input-channel that has not been explicitly declared automatically create a channel with that name.

    Also, if you can upgrade to 2.1.1, the 'Dispatcher has no subscribers' message now includes the channel name the dispatcher is running in.

    Comment


    • #3
      Thanks for the quick response. I upgraded to 2.1.1 and can see this new message:

      Dispatcher has no subscribers for channel vcEnricherChannelOut_excludes

      I've double checked the spelling and it's looking OK to me. I can see that the xsltTransformer_vcExcludes transformer uses vcEnricherChannelOut_excludes as an input channel.


      <si-xml:xpath-header-enricher
      input-channel="vcTypeEnricherChannelOut_excludes"
      output-channel="vcEnricherChannelOut_excludes">
      <si-xml:header name="ENTITY_KEY" xpath-expression="/product/@code"/>
      </si-xml:xpath-header-enricher>

      <si:channel id="vcEnricherChannelOut_excludes"/>

      <si-xml:xslt-transformer id="xsltTransformer_vcExcludes"

      input-channel="vcEnricherChannelOut_excludes"
      output-channel="vcExcludesTransformerChannelOut"
      xsl-resource="classpath:virtualCatalogExcludes.xsl">
      <si-xml:xslt-param name="companyNumber" expression="headers.COMPANY_NUMBER"/>
      </si-xml:xslt-transformer>

      Not sure where to go next. Any advice?

      Comment


      • #4
        You have two transformers called 'xsltTransformer_vcExcludes'

        The second definition (subscribed to itemReassignsEnricherChannelOut) overrides the first; thus causing no subscribers for the vcEnricherChannelOut_excludes channel.

        Comment


        • #5
          BTW, if you are using SpringSource Tool Suite, the Integration Graph is a good way to find this kind of wiring problem; it shows your flow as a diagram.

          Comment


          • #6
            Wow. I was hoping it would be a stupid mistake rather than a real issue.

            Thank you very much for your assistance, Gary. Sorry to trouble you with my screw up.

            Comment


            • #7
              No problem; if I hadn't done the same thing myself, I may not have been able to answer so quickly

              Comment


              • #8
                Another cause...

                Another cause (that I just ran in to) is when there are multiple integration files and any id's are repeated across files. All entities in integration files are turned into Spring beans and are all in the same namespace and the first one declared wins. In my case I had an outbound gateway in two different files named 'emailService' but each was connected to a different channel. The second declaration was being ignored and I received the 'dispatcher has no subscribers' for the channel that was feeding the second declaration.

                Hope this helps somebody!

                Comment

                Working...
                X