Announcement Announcement Module
Collapse
No announcement yet.
Confusion: What is the real purpose of output-channel with Routers? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Confusion: What is the real purpose of output-channel with Routers?

    Hello guys

    I am doing some experiments with Routers and I cant find the real function about the attribute output-channel

    I already worked with the most important attributes with
    • PayloadTypeRouter (int : payload-type-router)
    • HeaderValueRouter (int : header-value-router)

    For example working with the default-output-channel attribute, it work fine and with this attribute configured with some channel forward all the not matched Messages

    Code:
    <int:payload-type-router input-channel="inicio" 
    			 default-output-channel="noTypeMatchChannel">
           <int:mapping type="java.lang.String" channel="stringChannel" />		
           <int:mapping type="java.lang.Integer" channel="integerChannel" />
           <int:mapping type="com.manuel.jordan.domain.ItemArticulo" channel="instrumentoMusicalChannel" />		
    </int:payload-type-router>
    or

    Code:
    <int:header-value-router input-channel="inicio" 
    			 header-name="tipoItemArticulo" 
    			 default-output-channel="noTypeMatchChannel" >		
    	<int:mapping value="bajo" channel="instrumentoMusicalChannel"/>
    	<int:mapping value="guitarra" channel="instrumentoMusicalChannel"/>				
    </int:header-value-router>
    But with STS I am able to choice the attribute output-channel for each type of Router mentioned above, furthermore STS show a comment with follow text for both Routers type

    Code:
    Attribute : output-channel
    Identifies the Message channel where Message will be sent after it's being processed by this endpoint
    
    Data Type : string
    Just playing when I specify explicitly this attribute I did realize it never work or this channel never is called (I use an Service Activator to check this), perhaps I am confused, BTW STS integration-graph never show or draw this output channel how it does with the <int:mapping>

    Code:
    <int:payload-type-router input-channel="inicio" 
    			 output-channel="prefinal"
    			 default-output-channel="noTypeMatchChannel">
           <int:mapping type="java.lang.String" channel="stringChannel" />		
           <int:mapping type="java.lang.Integer" channel="integerChannel" />
           <int:mapping type="com.manuel.jordan.domain.ItemArticulo" channel="instrumentoMusicalChannel" />		
    </int:payload-type-router>
    ...
    <int:service-activator id="objectServictivator04"
    		       input-channel="prefinal"
    		       output-channel="final"
     		       method="serviceActivator04"
    		       ref="objectServiceActivator" />
    Same situation if I use

    Code:
    <int:header-value-router input-channel="inicio" 
    			 header-name="tipoItemArticulo"
                             output-channel="prefinal" 
    			 default-output-channel="noTypeMatchChannel" >		
    	<int:mapping value="bajo" channel="instrumentoMusicalChannel"/>
    	<int:mapping value="guitarra" channel="instrumentoMusicalChannel"/>				
    </int:header-value-router>
    ...
    <int:service-activator id="objectServictivator04"
    		       input-channel="prefinal"
    		       output-channel="final"
     		       method="serviceActivator04"
    		       ref="objectServiceActivator" />
    Even if I use this

    Code:
    <int:payload-type-router input-channel="inicio" 
                             resolution-required="true"
    			 output-channel="prefinal" 
                             default-output-channel="noTypeMatchChannel">
           <int:mapping type="java.lang.String" channel="stringChannel" />		
           <int:mapping type="java.lang.Integer" channel="integerChannel" />
           <int:mapping type="com.manuel.jordan.domain.ItemArticulo" channel="instrumentoMusicalChannel" />		
    </int:payload-type-router>
    Practically default-output-channel is really mandatory than output-channel, I cant see the real purpose output-channel in Routers

    Thank you

  • #2
    Could you provide a link to this forum post from the JIRA issue you had just created? This is really the same issue. No router should ever provide the 'output-channel' attribute as an option. The reason it shows up is that it's inherited from a base type within the XSD Schema, and we need to fix that so that 'output-channel' is *not* available on any router element.

    Thanks again,
    Mark

    Comment


    • #3
      Hello Mark

      Could you provide a link to this forum post from the JIRA issue you had just created?
      Yes of course
      JIRA: https://jira.springsource.org/browse/INT-2053
      and the other thread related with this issue is

      This is really the same issue. No router should ever provide the 'output-channel' attribute as an option.
      Understood

      The reason it shows up is that it's inherited from a base type within the XSD Schema, and we need to fix that so that 'output-channel' is *not* available on any router element.
      Now I understand clearly the situation and now the really context about

      Attribute : output-channel
      Identifies the Message channel where Message will be sent
      after it's being processed by this endpoint


      Data Type : string
      This attribute must be handle only internally by the endpoint and represent the final resolution about what must be the unique output

      Thanks again,
      No problem

      Best Regards

      Comment

      Working...
      X