OK, i am glad you've figured it out, because i've just added the transformer and everything still works fine.
Here is the config I am using:
Code:
<si:gateway id="enhancedTimelineGateway"
service-interface="integration.EnhancedTimelineGateway"/>
<si:header-enricher input-channel="enricherChannel" output-channel="enhancedTimelineRequest">
<si:header name="springintegration_http_requestMethod" value="GET"/>
</si:header-enricher>
<si:publish-subscribe-channel id="enhancedTimelineRequest" apply-sequence="true"/>
<si:transformer input-channel="enhancedTimelineRequest" output-channel="httpGatewayA-channel">
<bean class="integration.TwitterMessageTransformer"/>
</si:transformer>
<si-http:outbound-gateway
request-channel="httpGatewayA-channel"
default-url="http://localhost:8080/test"
charset="UTF-8"
request-timeout="1234"
reply-channel="aggregatorInputChannel"/>
<si:transformer input-channel="enhancedTimelineRequest" output-channel="httpGatewayB-channel">
<bean class="integration.WeatherUndergroundMessageTransformer"/>
</si:transformer>
<si-http:outbound-gateway
request-channel="httpGatewayB-channel"
default-url="http://localhost:8080/test"
charset="UTF-8"
request-timeout="1234"
reply-channel="aggregatorInputChannel"/>
<si:aggregator input-channel="aggregatorInputChannel" method="prepareEnhancedTimeline">
<bean class="integration.MessageAggregator"/>
</si:aggregator>
As far as the second question, you don't have to define channels explicitly if:
1) there is an element that contains attribute input-channel
2) you are OK with it being Direct channel
For example, this configuration is sufficient:
Code:
<service-activator input-channel="foo".../>
foo channel will be auto-created as Direct channel.
However if you want it to be any other channel (pub-sub, queue etc.), then you would have to define it explicitly.