Source:
<code>protected StandardIntegrationFlow get() { if (this.integrationFlow == null) { if (this.currentMessageChannel instanceof FixedSubscriberChannelPrototype) { throw new BeanCreationException("The 'currentMessageChannel' (" + this.currentMessageChannel + ") is a prototype for 'FixedSubscriberChannel' which can't be created without 'MessageHandler' " + "constructor argument. That means that '.fixedSubscriberChannel()' can't be the last " + "EIP-method in the 'IntegrationFlow' definition."); } if (this.integrationComponents.size() == 1) { if (this.currentComponent != null) { if (this.currentComponent instanceof SourcePollingChannelAdapterSpec) { throw new BeanCreationException("The 'SourcePollingChannelAdapter' (" + this.currentComponent + ") " + "must be configured with at least one 'MessageChannel' or 'MessageHandler'."); } } else if (this.currentMessageChannel != null) { throw new BeanCreationException("The 'IntegrationFlow' can't consist of only one 'MessageChannel'. " + "Add at lest '.bridge()' EIP-method before the end of flow."); } } if (this.implicitChannel) { Optional<Object> lastComponent = this.integrationComponents.keySet() .stream() .reduce((first, second) -> second); if (lastComponent.get() instanceof WireTapSpec) { enrichHeaders( Collections.singletonMap( <START> MessageHeaders.REPLY_CHANNEL, IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME)); <END> } } this.integrationFlow = new StandardIntegrationFlow(this.integrationComponents); } return this.integrationFlow; }</code><technical_language>I a couple of ideas: 1. Detect flow starts a gateway automatically add a bridge - I rejected this add a replyChannel header mid-flow. 2. Add a new property wireTap log specs - .log().andReply(), allowed component. WAD works for too</technical_language>

Target:
protected StandardIntegrationFlow get() { if (this.integrationFlow == null) { if (this.currentMessageChannel instanceof FixedSubscriberChannelPrototype) { throw new BeanCreationException("The 'currentMessageChannel' (" + this.currentMessageChannel + ") is a prototype for 'FixedSubscriberChannel' which can't be created without 'MessageHandler' " + "constructor argument. That means that '.fixedSubscriberChannel()' can't be the last " + "EIP-method in the 'IntegrationFlow' definition."); } if (this.integrationComponents.size() == 1) { if (this.currentComponent != null) { if (this.currentComponent instanceof SourcePollingChannelAdapterSpec) { throw new BeanCreationException("The 'SourcePollingChannelAdapter' (" + this.currentComponent + ") " + "must be configured with at least one 'MessageChannel' or 'MessageHandler'."); } } else if (this.currentMessageChannel != null) { throw new BeanCreationException("The 'IntegrationFlow' can't consist of only one 'MessageChannel'. " + "Add at lest '.bridge()' EIP-method before the end of flow."); } } if (this.implicitChannel) { Optional<Object> lastComponent = this.integrationComponents.keySet() .stream() .reduce((first, second) -> second); if (lastComponent.get() instanceof WireTapSpec) { channel(IntegrationContextUtils.NULL_CHANNEL_BEAN_NAME); } } this.integrationFlow = new StandardIntegrationFlow(this.integrationComponents); } return this.integrationFlow; }