public class RabbitStreamMessageHandler
extends org.springframework.integration.handler.AbstractMessageHandler
implements org.springframework.context.Lifecycle
MessageHandler based on RabbitStreamOperations.
TODO: This class will move to Spring Integration in 6.0.| Modifier and Type | Class and Description |
|---|---|
static interface |
RabbitStreamMessageHandler.FailureCallback
Callback for when publishing fails.
|
EXPRESSION_PARSER, logger| Constructor and Description |
|---|
RabbitStreamMessageHandler(org.springframework.rabbit.stream.producer.RabbitStreamOperations streamOperations)
Create an instance with the provided
RabbitStreamOperations. |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.rabbit.stream.producer.RabbitStreamOperations |
getStreamOperations()
Return the
RabbitStreamOperations. |
protected void |
handleMessageInternal(org.springframework.messaging.Message<?> requestMessage) |
boolean |
isRunning() |
void |
setConfirmTimeout(long confirmTimeout)
Set the confirm timeout.
|
void |
setFailureCallback(RabbitStreamMessageHandler.FailureCallback failureCallback)
Set a callback to be invoked when a send fails.
|
void |
setHeaderMapper(org.springframework.integration.amqp.support.AmqpHeaderMapper headerMapper)
Set a custom
AmqpHeaderMapper for mapping request and reply headers. |
void |
setHeadersMappedLast(boolean headersMappedLast)
When mapping headers for the outbound message, determine whether the headers are
mapped before the message is converted, or afterwards.
|
void |
setSuccessCallback(org.springframework.util.concurrent.SuccessCallback<org.springframework.messaging.Message<?>> successCallback)
Set a callback to be invoked when a send is successful.
|
void |
setSync(boolean sync)
Set to true to wait for a confirmation.
|
void |
start() |
void |
stop() |
handleMessage, onComplete, onError, onNext, onSubscribebuildSendTimer, destroy, getComponentType, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrackafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, onInit, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic RabbitStreamMessageHandler(org.springframework.rabbit.stream.producer.RabbitStreamOperations streamOperations)
RabbitStreamOperations.streamOperations - the operations.public void setSuccessCallback(org.springframework.util.concurrent.SuccessCallback<org.springframework.messaging.Message<?>> successCallback)
successCallback - the callback.public void setFailureCallback(RabbitStreamMessageHandler.FailureCallback failureCallback)
failureCallback - the callback.public void setSync(boolean sync)
sync - true to wait.setConfirmTimeout(long)public void setConfirmTimeout(long confirmTimeout)
confirmTimeout - the timeout.setSync(boolean)public void setHeaderMapper(org.springframework.integration.amqp.support.AmqpHeaderMapper headerMapper)
AmqpHeaderMapper for mapping request and reply headers.
Defaults to DefaultAmqpHeaderMapper.outboundMapper().headerMapper - the AmqpHeaderMapper to use.public void setHeadersMappedLast(boolean headersMappedLast)
SimpleMessageConverter with a
String payload that contains json; the converter will set the content type to
text/plain which can be overridden to application/json by setting
the AmqpHeaders.CONTENT_TYPE message header. Default: false.headersMappedLast - true if headers are mapped after conversion.public org.springframework.rabbit.stream.producer.RabbitStreamOperations getStreamOperations()
RabbitStreamOperations.protected void handleMessageInternal(org.springframework.messaging.Message<?> requestMessage)
handleMessageInternal in class org.springframework.integration.handler.AbstractMessageHandlerpublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.LifecycleCopyright © 2022 Pivotal Software, Inc.. All rights reserved.