Class StreamUtils

java.lang.Object
org.springframework.cloud.stream.binder.rabbit.StreamUtils

public final class StreamUtils extends Object
Utilities for stream components. Used to prevent a hard runtime dependency on spring-rabbit-stream.
Since:
3.2
Author:
Gary Russell, Artem Bilan
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    configureAdapter(org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter adapter)
    Configure the channel adapter for streams support.
    static org.springframework.amqp.rabbit.listener.ObservableListenerContainer
    createContainer(org.springframework.cloud.stream.provisioning.ConsumerDestination consumerDestination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.rabbit.properties.RabbitConsumerProperties> properties, String destination, org.springframework.context.ApplicationContext applicationContext)
    Create a StreamListenerContainer.
    static org.springframework.messaging.MessageHandler
    createStreamMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination producerDestination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.rabbit.properties.RabbitProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel, String destination, org.springframework.cloud.stream.binder.rabbit.properties.RabbitProducerProperties extendedProperties, org.springframework.context.support.AbstractApplicationContext applicationContext, Function<org.springframework.cloud.stream.binder.rabbit.properties.RabbitProducerProperties, org.springframework.integration.amqp.support.AmqpHeaderMapper> headerMapperFunction)
    Create a RabbitStreamMessageHandler.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • createContainer

      public static org.springframework.amqp.rabbit.listener.ObservableListenerContainer createContainer(org.springframework.cloud.stream.provisioning.ConsumerDestination consumerDestination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.rabbit.properties.RabbitConsumerProperties> properties, String destination, org.springframework.context.ApplicationContext applicationContext)
      Create a StreamListenerContainer.
      Parameters:
      consumerDestination - the destination.
      group - the group.
      properties - the properties.
      destination - the destination.
      applicationContext - the application context.
      Returns:
      the container.
    • configureAdapter

      public static void configureAdapter(org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter adapter)
      Configure the channel adapter for streams support.
      Parameters:
      adapter - the adapter.
    • createStreamMessageHandler

      public static org.springframework.messaging.MessageHandler createStreamMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination producerDestination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<org.springframework.cloud.stream.binder.rabbit.properties.RabbitProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel, String destination, org.springframework.cloud.stream.binder.rabbit.properties.RabbitProducerProperties extendedProperties, org.springframework.context.support.AbstractApplicationContext applicationContext, Function<org.springframework.cloud.stream.binder.rabbit.properties.RabbitProducerProperties, org.springframework.integration.amqp.support.AmqpHeaderMapper> headerMapperFunction)
      Create a RabbitStreamMessageHandler.
      Parameters:
      producerDestination - the destination.
      producerProperties - the properties.
      errorChannel - the error channel
      destination - the destination.
      extendedProperties - the extended properties.
      applicationContext - the application context.
      headerMapperFunction - the header mapper function.
      Returns:
      the handler.