Class RepublishMessageRecovererWithConfirms
java.lang.Object
org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer
org.springframework.amqp.rabbit.retry.RepublishMessageRecovererWithConfirms
- All Implemented Interfaces:
MessageRecoverer
A
RepublishMessageRecoverer
supporting publisher confirms and returns.- Since:
- 2.3.3
- Author:
- Gary Russell
-
Field Summary
Fields inherited from class org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer
DEFAULT_FRAME_MAX_HEADROOM, errorExchangeNameExpression, errorRoutingKeyExpression, errorTemplate, evaluationContext, logger, X_EXCEPTION_MESSAGE, X_EXCEPTION_STACKTRACE, X_ORIGINAL_EXCHANGE, X_ORIGINAL_ROUTING_KEY
-
Constructor Summary
ConstructorDescriptionRepublishMessageRecovererWithConfirms
(RabbitTemplate errorTemplate, String errorExchange, String errorRoutingKey, CachingConnectionFactory.ConfirmType confirmType) Use the supplied template to publish the messsage with the provided confirm type to the provided exchange with the provided routing key.RepublishMessageRecovererWithConfirms
(RabbitTemplate errorTemplate, String errorExchange, CachingConnectionFactory.ConfirmType confirmType) Use the supplied template to publish the messsage with the provided confirm type to the provided exchange with the default routing key.RepublishMessageRecovererWithConfirms
(RabbitTemplate errorTemplate, CachingConnectionFactory.ConfirmType confirmType) Use the supplied template to publish the messsage with the provided confirm type. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Send the message.void
setConfirmTimeout
(long confirmTimeout) Set the confirm timeout; default 10 seconds.Methods inherited from class org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer
additionalHeaders, errorRoutingKeyPrefix, frameMaxHeadroom, getDeliveryMode, getErrorRoutingKeyPrefix, getStackTraceAsString, prefixedOriginalRoutingKey, recover, setDeliveryMode, setErrorRoutingKeyPrefix
-
Constructor Details
-
RepublishMessageRecovererWithConfirms
public RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate, CachingConnectionFactory.ConfirmType confirmType) Use the supplied template to publish the messsage with the provided confirm type. The template and its connection factory must be suitably configured to support the confirm type.- Parameters:
errorTemplate
- the template.confirmType
- the confirmType.
-
RepublishMessageRecovererWithConfirms
public RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate, String errorExchange, CachingConnectionFactory.ConfirmType confirmType) Use the supplied template to publish the messsage with the provided confirm type to the provided exchange with the default routing key. The template and its connection factory must be suitably configured to support the confirm type.- Parameters:
errorTemplate
- the template.confirmType
- the confirmType.errorExchange
- the exchange.
-
RepublishMessageRecovererWithConfirms
public RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate, String errorExchange, String errorRoutingKey, CachingConnectionFactory.ConfirmType confirmType) Use the supplied template to publish the messsage with the provided confirm type to the provided exchange with the provided routing key. The template and its connection factory must be suitably configured to support the confirm type.- Parameters:
errorTemplate
- the template.confirmType
- the confirmType.errorExchange
- the exchange.errorRoutingKey
- the routing key.
-
-
Method Details
-
setConfirmTimeout
public void setConfirmTimeout(long confirmTimeout) Set the confirm timeout; default 10 seconds.- Parameters:
confirmTimeout
- the timeout.
-
doSend
Description copied from class:RepublishMessageRecoverer
Send the message.- Overrides:
doSend
in classRepublishMessageRecoverer
- Parameters:
exchange
- the exchange or null to use the template's default.routingKey
- the routing key.message
- the message.
-