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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfigureAdapter(org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter adapter)Configure the channel adapter for streams support.static org.springframework.amqp.rabbit.listener.MessageListenerContainercreateContainer(ConsumerDestination consumerDestination, String group, ExtendedConsumerProperties<RabbitConsumerProperties> properties, String destination, RabbitConsumerProperties extension, org.springframework.context.support.AbstractApplicationContext applicationContext)Create aStreamListenerContainer.static org.springframework.messaging.MessageHandlercreateStreamMessageHandler(ProducerDestination producerDestination, ExtendedProducerProperties<RabbitProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel, String destination, RabbitProducerProperties extendedProperties, org.springframework.context.support.AbstractApplicationContext applicationContext, Function<RabbitProducerProperties,org.springframework.integration.amqp.support.AmqpHeaderMapper> headerMapperFunction)Create aRabbitStreamMessageHandler.
-
-
-
Method Detail
-
createContainer
public static org.springframework.amqp.rabbit.listener.MessageListenerContainer createContainer(ConsumerDestination consumerDestination, String group, ExtendedConsumerProperties<RabbitConsumerProperties> properties, String destination, RabbitConsumerProperties extension, org.springframework.context.support.AbstractApplicationContext applicationContext)
Create aStreamListenerContainer.- Parameters:
consumerDestination- the destination.group- the group.properties- the properties.destination- the destination.extension- the properties extension.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(ProducerDestination producerDestination, ExtendedProducerProperties<RabbitProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel, String destination, RabbitProducerProperties extendedProperties, org.springframework.context.support.AbstractApplicationContext applicationContext, Function<RabbitProducerProperties,org.springframework.integration.amqp.support.AmqpHeaderMapper> headerMapperFunction)
Create aRabbitStreamMessageHandler.- Parameters:
producerDestination- the destination.producerProperties- the properties.errorChannel- the error channeldestination- the destination.extendedProperties- the extended properties.abstractApplicationContext- the application context.headerMapperFunction- the header mapper function.- Returns:
- the handler.
-
-