title: Spring cloud stream custom binder not registered. Disables the kafka binder if used @Configuration
body: <p>I'm trying to make a custom spring cloud stream binder but it just wont register itself:</p>
  
  <p>Binder Implementation:</p>
  
  <pre><code>public class DPSBinder implements Binder&lt;SubscribableChannel, ConsumerProperties, ProducerProperties&gt; {
  
  private DecisionPersistenceServiceClient dpsClient;
  
  private MessageHandler dpsClientConsumerMessageHandler = null;
  
  public DPSBinder(DecisionPersistenceServiceClient dpsClient) {
      this.dpsClient = dpsClient;
  }
  
  @Override
  public Binding&lt;SubscribableChannel&gt; bindConsumer(String name, String group, SubscribableChannel inboundBindTarget,
          ConsumerProperties consumerProperties) {
  
      return null;
  }
  
  @Override
  public Binding&lt;SubscribableChannel&gt; bindProducer(String name, SubscribableChannel outboundBindTarget,
          ProducerProperties producerProperties) {
  
      switch (name) {
  
      case "PERSIST_POST":
  
          this.dpsClientConsumerMessageHandler = message -&gt; dpsClient.persist((DPAPayload) message.getPayload());
  
          break;
  
      default:
          this.dpsClientConsumerMessageHandler = null;
  
      }
  
      if (this.dpsClientConsumerMessageHandler != null)
          this.subscribe(outboundBindTarget);
  
      return () -&gt; this.dpsClientConsumerMessageHandler = null;
  
  }
  
  public void subscribe(SubscribableChannel outboundBindTarget) {
  
      outboundBindTarget.subscribe(this.dpsClientConsumerMessageHandler);
  }}
  </code></pre>
  
  <p>configuration class:</p>
  
  <pre><code>@Configuration
  public class DPSBinderConfiguration {
  @Bean
  public DPSBinder dpsBinder(DecisionPersistenceServiceClient dpsClient) {
  
      return new DPSBinder(dpsClient);
  }}
  </code></pre>
  
  <p>spring.binders file:</p>
  
  <pre><code>dps:something.something.DPSBinderConfiguration
  </code></pre>
  
  <p>application.yml</p>
  
  <pre><code>application.yml
  spring:
   cloud:
    stream:
     bindings:
      input:
        destination: DPP_EVENTS
        group: dpp-local
        binder: kafka
      output:
        destination: PERSIST_POST
        binder: dps
    binders:
      kafka:
        type: kafka
      dps:
        type: dps
  </code></pre>
  
  <p>I've followed the spring cloud stream guidelines for creating a custome binder but this is not working. Moreover, using the @Configuration for creating binder beans disables the kafka binder which i've added on classpath.</p>