Interface SinkModule<S extends Message,​T extends Message>

    • Field Detail

    • Method Detail

      • getId

        java.lang.String getId()
        Globally unique identifier. Used in the JMS queue name in the Camel implementation.
      • getNumConsumerThreads

        int getNumConsumerThreads()
        The number of threads used to consume from the broker.
      • marshal

        byte[] marshal​(T message)
        Marshals the aggregated message to a byte array.
      • unmarshal

        T unmarshal​(byte[] message)
        Unmarshals the aggregated message from a byte array.
      • marshalSingleMessage

        byte[] marshalSingleMessage​(S message)
        Marshals single message to a byte array.
      • unmarshalSingleMessage

        S unmarshalSingleMessage​(byte[] message)
        Unmarshals single message from a byte array.
      • getAggregationPolicy

        AggregationPolicy<S,​T,​?> getAggregationPolicy()
        Defines how messages should be combined, and when they should be "released". Modules that do not wish to use aggregation can return null.
        Returns:
        the AggregationPolicy used to combine messages, or null if the messages should not be combined.
      • getAsyncPolicy

        AsyncPolicy getAsyncPolicy()
        Defines how messages should be asynchronously dispatched.
        Returns:
        the AsyncPolicy used when asynchronously dispatching messages for this module.
      • getRoutingKey

        default java.util.Optional<java.lang.String> getRoutingKey​(T message)
        Thr routing key will be used to ensure all messages of the same group is handled by the same consumer.
        Parameters:
        message - the message to generate the routing key from
        Returns:
        the routing key or, Optional.empty() if no routing is required