Class RepublishMessageRecovererWithConfirms
- java.lang.Object
-
- org.springframework.amqp.rabbit.retry.RepublishMessageRecoverer
-
- org.springframework.amqp.rabbit.retry.RepublishMessageRecovererWithConfirms
-
- All Implemented Interfaces:
MessageRecoverer
public class RepublishMessageRecovererWithConfirms extends RepublishMessageRecoverer
ARepublishMessageRecoverer
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, errorExchangeName, errorRoutingKey, errorTemplate, logger, X_EXCEPTION_MESSAGE, X_EXCEPTION_STACKTRACE, X_ORIGINAL_EXCHANGE, X_ORIGINAL_ROUTING_KEY
-
-
Constructor Summary
Constructors Constructor Description 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.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doSend(String exchange, String routingKey, Message message)
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, recover, setDeliveryMode, setErrorRoutingKeyPrefix
-
-
-
-
Constructor Detail
-
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 Detail
-
setConfirmTimeout
public void setConfirmTimeout(long confirmTimeout)
Set the confirm timeout; default 10 seconds.- Parameters:
confirmTimeout
- the timeout.
-
doSend
protected void doSend(@Nullable String exchange, String routingKey, Message message)
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.
-
-