Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3023

Add XML namespace parser support for an inbound-channel-adapter at the beginning of a chain



      When an inbound-channel-adaptor feeds into a chain, it would be convenient and intuitive if the connecting channel could be inferred the same way as it is between the MessageHandlers in the chain.

      In this example, the channel attributes are just wiring. They contribute little to the meaning of the flow, and the developer is forced to come up with a unique channel name. In larger configurations, this is tedious and pollutes the channel namespace.

      <int-http:inbound-channel-adapter channel="channel1" ... />
      <int:chain input-channel="channel1">
        <int:service-activator ... />

      In this hypothetical example, the adapter is moved to the top of the chain, and the channel configuration is made implicit. With a message source at the top of the chain, the processing flow remains clear. Under the hood, there is still a direct channel between the adapter and the chain, but the developer doesn't have to name it.

        <int-http:inbound-channel-adapter ... />
        <int:service-activator ... />

      And, in cases where explicit channel configuration is desired, it would still be convenient to be able to nest the adapter in the channel and infer its channel attribute.

      <int:channel id="someChannel" />
      <int:chain input-channel="someChannel">
        <int-http:inbound-channel-adapter ... />
        <int:service-activator ... />

      A chain as presently implemented in Spring Integration is technically a sequence of MessageHandlers, and this feature would admittedly muddy that definition. However, syntactically, <int:chain /> is clearly a grouping mechanism, and it would be convenient and intuitive to be able to nest all participating elements inside the same tag. This boils down to syntactic sugar, but when placed adjacent to a chain with its clean, implicit channel wiring, the channel boilerplate currently required for inbound adapters is fairly conspicuous and distracting.




            • Assignee:
              abilan Artem Bilan
              nlwillia Nathan Williams
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: