Source:
public final Binding<MessageChannel> doBindConsumer(String name, String group, MessageChannel inputChannel, final C properties) throws BinderException { MessageProducer consumerEndpoint = null; try { D destination = createConsumerDestinationIfNecessary(name, group, properties); final boolean extractEmbeddedHeaders = HeaderMode.embeddedHeaders.equals( properties.getHeaderMode()) && !this.supportsHeadersNatively; ReceivingHandler rh = new ReceivingHandler(extractEmbeddedHeaders); rh.setOutputChannel(inputChannel); final FixedSubscriberChannel bridge = new FixedSubscriberChannel(rh); bridge.setBeanName("bridge." + name); consumerEndpoint = createConsumerEndpoint(name, group, destination, properties); consumerEndpoint.setOutputChannel(bridge); if(consumerEndpoint instanceof IntegrationObjectSupport) { ((IntegrationObjectSupport) consumerEndpoint).afterPropertiesSet(); } if (consumerEndpoint instanceof Lifecycle) { ((Lifecycle) consumerEndpoint).start(); } final Object endpoint = consumerEndpoint; EventDrivenConsumer edc = new EventDrivenConsumer(bridge, rh); edc.setBeanName("inbound." + groupedName(name, group)); edc.start(); return new DefaultBinding<MessageChannel>(name, group, inputChannel, endpoint instanceof Lifecycle ? (Lifecycle) endpoint : null) { @Override protected void afterUnbind() { AbstractMessageChannelBinder.this.afterUnbindConsumer(this.name, this.group, properties); } }; } catch (Exception e) { if (consumerEndpoint instanceof Lifecycle) { ((Lifecycle) consumerEndpoint).stop(); } if (e instanceof BinderException) { throw e; } else { throw new BinderException("Exception thrown while starting consumer: ", e); } } }

Target:
public final Binding<MessageChannel> doBindConsumer(String name, String group, MessageChannel inputChannel, final C properties) throws BinderException { MessageProducer consumerEndpoint = null; try { D destination = createConsumerDestinationIfNecessary(name, group, properties); final boolean extractEmbeddedHeaders = HeaderMode.embeddedHeaders.equals( properties.getHeaderMode()) && !this.supportsHeadersNatively; ReceivingHandler rh = new ReceivingHandler(extractEmbeddedHeaders); rh.setOutputChannel(inputChannel); final FixedSubscriberChannel bridge = new FixedSubscriberChannel(rh); bridge.setBeanName("bridge." + name); consumerEndpoint = createConsumerEndpoint(name, group, destination, properties); consumerEndpoint.setOutputChannel(bridge); if(consumerEndpoint instanceof InitializingBean) { ((InitializingBean) consumerEndpoint).afterPropertiesSet(); } if (consumerEndpoint instanceof Lifecycle) { ((Lifecycle) consumerEndpoint).start(); } final Object endpoint = consumerEndpoint; EventDrivenConsumer edc = new EventDrivenConsumer(bridge, rh); edc.setBeanName("inbound." + groupedName(name, group)); edc.start(); return new DefaultBinding<MessageChannel>(name, group, inputChannel, endpoint instanceof Lifecycle ? (Lifecycle) endpoint : null) { @Override protected void afterUnbind() { AbstractMessageChannelBinder.this.afterUnbindConsumer(this.name, this.group, properties); } }; } catch (Exception e) { if (consumerEndpoint instanceof Lifecycle) { ((Lifecycle) consumerEndpoint).stop(); } if (e instanceof BinderException) { throw (BinderException)e; } else { throw new BinderException("Exception thrown while starting consumer: ", e); } } }