Class RabbitStreamMessageHandler
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.handler.MessageHandlerSupport
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.amqp.outbound.RabbitStreamMessageHandler
- All Implemented Interfaces:
- org.reactivestreams.Subscriber<Message<?>>,- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- ApplicationContextAware,- Ordered,- ComponentSourceAware,- ExpressionCapable,- Orderable,- IntegrationPattern,- NamedComponent,- IntegrationManagement,- TrackableComponent,- MessageHandler,- reactor.core.CoreSubscriber<Message<?>>
MessageHandler based on RabbitStreamOperations.- Since:
- 6.0
- Author:
- Gary Russell, Chris Bono, Ryan Riley
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.context.IntegrationObjectSupportEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionRabbitStreamMessageHandler(RabbitStreamOperations streamOperations) Create an instance with the providedRabbitStreamOperations.
- 
Method SummaryModifier and TypeMethodDescriptionprotected MessageChannelprotected MessageChannelReturn theRabbitStreamOperations.protected voidhandleMessageInternal(Message<?> requestMessage) voidsetConfirmTimeout(long confirmTimeout) Set the confirm timeout.voidsetHeaderMapper(AmqpHeaderMapper headerMapper) Set a customAmqpHeaderMapperfor mapping request and reply headers.voidsetHeadersMappedLast(boolean headersMappedLast) When mapping headers for the outbound message, determine whether the headers are mapped before the message is converted, or afterwards.voidsetSendFailureChannel(MessageChannel sendFailureChannel) Set the failure channel.voidsetSendFailureChannelName(String sendFailureChannelName) Set the failure channel name.voidsetSendSuccessChannel(MessageChannel sendSuccessChannel) Set the success channel.voidsetSendSuccessChannelName(String sendSuccessChannelName) Set the Success channel name.voidsetSync(boolean sync) Set to true to wait for a confirmation.Methods inherited from class org.springframework.integration.handler.AbstractMessageHandlerhandleMessage, onComplete, onError, onNext, onSubscribe, setObservationConventionMethods inherited from class org.springframework.integration.handler.MessageHandlerSupportbuildSendTimer, destroy, getComponentType, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getObservationRegistry, getOrder, getOverrides, isLoggingEnabled, isObserved, registerMetricsCaptor, registerObservationRegistry, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackMethods inherited from class org.springframework.integration.context.IntegrationObjectSupportafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface reactor.core.CoreSubscribercurrentContextMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAsMethods inherited from interface org.springframework.integration.support.context.NamedComponentgetBeanName, getComponentName
- 
Constructor Details- 
RabbitStreamMessageHandlerCreate an instance with the providedRabbitStreamOperations.- Parameters:
- streamOperations- the operations.
 
 
- 
- 
Method Details- 
setSendFailureChannelSet the failure channel. After a send failure, anErrorMessagewill be sent to this channel with a payload of the exception with the failed message.- Parameters:
- sendFailureChannel- the failure channel.
 
- 
setSendFailureChannelNameSet the failure channel name. After a send failure, anErrorMessagewill be sent to this channel with a payload of the exception with the failed message.- Parameters:
- sendFailureChannelName- the failure channel name.
 
- 
setSendSuccessChannelSet the success channel.- Parameters:
- sendSuccessChannel- the success channel.
 
- 
setSendSuccessChannelNameSet the Success channel name.- Parameters:
- sendSuccessChannelName- the success channel name.
 
- 
setSyncpublic void setSync(boolean sync) Set to true to wait for a confirmation.- Parameters:
- sync- true to wait.
- See Also:
 
- 
setConfirmTimeoutpublic void setConfirmTimeout(long confirmTimeout) Set the confirm timeout.- Parameters:
- confirmTimeout- the timeout.
- See Also:
 
- 
setHeaderMapperSet a customAmqpHeaderMapperfor mapping request and reply headers. Defaults toDefaultAmqpHeaderMapper.outboundMapper().- Parameters:
- headerMapper- the- AmqpHeaderMapperto use.
 
- 
setHeadersMappedLastpublic void setHeadersMappedLast(boolean headersMappedLast) When mapping headers for the outbound message, determine whether the headers are mapped before the message is converted, or afterwards. This only affects headers that might be added by the message converter. When false, the converter's headers win; when true, any headers added by the converter will be overridden (if the source message has a header that maps to those headers). You might wish to set this to true, for example, when using aSimpleMessageConverterwith a String payload that contains json; the converter will set the content type totext/plainwhich can be overridden toapplication/jsonby setting theAmqpHeaders.CONTENT_TYPEmessage header. Default: false.- Parameters:
- headersMappedLast- true if headers are mapped after conversion.
 
- 
getStreamOperationsReturn theRabbitStreamOperations.- Returns:
- the operations.
 
- 
getSendFailureChannel
- 
getSendSuccessChannel
- 
handleMessageInternal- Specified by:
- handleMessageInternalin class- AbstractMessageHandler
 
 
-