Interface Binder<T,​C extends ConsumerProperties,​P extends ProducerProperties>

  • Type Parameters:
    T - the primary binding type (e.g. MessageChannel).
    C - the consumer properties type.
    P - the producer properties type.
    All Known Subinterfaces:
    ExtendedPropertiesBinder<T,​C,​P>
    All Known Implementing Classes:
    AbstractBinder, AbstractMessageChannelBinder

    public interface Binder<T,​C extends ConsumerProperties,​P extends ProducerProperties>
    A strategy interface used to bind an app interface to a logical name. The name is intended to identify a logical consumer or producer of messages. This may be a queue, a channel adapter, another message channel, a Spring bean, etc.
    Since:
    1.0
    Author:
    Mark Fisher, David Turanski, Gary Russell, Jennifer Hickey, Ilayaperumal Gopinathan, Marius Bogoevici
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Binding<T> bindConsumer​(String name, String group, T inboundBindTarget, C consumerProperties)
      Bind the target component as a message consumer to the logical entity identified by the name.
      Binding<T> bindProducer​(String name, T outboundBindTarget, P producerProperties)
      Bind the target component as a message producer to the logical entity identified by the name.
    • Method Detail

      • bindConsumer

        Binding<T> bindConsumer​(String name,
                                String group,
                                T inboundBindTarget,
                                C consumerProperties)
        Bind the target component as a message consumer to the logical entity identified by the name.
        Parameters:
        name - the logical identity of the message source
        group - the consumer group to which this consumer belongs - subscriptions are shared among consumers in the same group (a null or empty String, must be treated as an anonymous group that doesn't share the subscription with any other consumer)
        inboundBindTarget - the app interface to be bound as a consumer
        consumerProperties - the consumer properties
        Returns:
        the setup binding
      • bindProducer

        Binding<T> bindProducer​(String name,
                                T outboundBindTarget,
                                P producerProperties)
        Bind the target component as a message producer to the logical entity identified by the name.
        Parameters:
        name - the logical identity of the message target
        outboundBindTarget - the app interface to be bound as a producer
        producerProperties - the producer properties
        Returns:
        the setup binding