Class StreamUtils
java.lang.Object
org.springframework.cloud.stream.binder.rabbit.StreamUtils
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 TypeMethodDescriptionstatic voidconfigureAdapter(org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter adapter) Configure the channel adapter for streams support.static org.springframework.amqp.rabbit.listener.ObservableListenerContainercreateContainer(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 aStreamListenerContainer.static org.springframework.messaging.MessageHandlercreateStreamMessageHandler(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 aRabbitStreamMessageHandler.
-
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 aStreamListenerContainer.- 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 aRabbitStreamMessageHandler.- Parameters:
producerDestination- the destination.producerProperties- the properties.errorChannel- the error channeldestination- the destination.extendedProperties- the extended properties.applicationContext- the application context.headerMapperFunction- the header mapper function.- Returns:
- the handler.
-