public class RepublishMessageRecovererWithConfirms extends RepublishMessageRecoverer
RepublishMessageRecoverer
supporting publisher confirms and returns.DEFAULT_FRAME_MAX_HEADROOM, errorExchangeName, errorRoutingKey, errorTemplate, logger, X_EXCEPTION_MESSAGE, X_EXCEPTION_STACKTRACE, X_ORIGINAL_EXCHANGE, X_ORIGINAL_ROUTING_KEY
Constructor and Description |
---|
RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate,
CachingConnectionFactory.ConfirmType confirmType)
Use the supplied template to publish the messsage with the provided confirm type.
|
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,
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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doSend(String exchange,
String routingKey,
Message message)
Send the message.
|
void |
setConfirmTimeout(long confirmTimeout)
Set the confirm timeout; default 10 seconds.
|
additionalHeaders, errorRoutingKeyPrefix, frameMaxHeadroom, getDeliveryMode, getErrorRoutingKeyPrefix, recover, setDeliveryMode, setErrorRoutingKeyPrefix
public RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate, CachingConnectionFactory.ConfirmType confirmType)
errorTemplate
- the template.confirmType
- the confirmType.public RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate, String errorExchange, CachingConnectionFactory.ConfirmType confirmType)
errorTemplate
- the template.confirmType
- the confirmType.errorExchange
- the exchange.public RepublishMessageRecovererWithConfirms(RabbitTemplate errorTemplate, String errorExchange, String errorRoutingKey, CachingConnectionFactory.ConfirmType confirmType)
errorTemplate
- the template.confirmType
- the confirmType.errorExchange
- the exchange.errorRoutingKey
- the routing key.public void setConfirmTimeout(long confirmTimeout)
confirmTimeout
- the timeout.protected void doSend(@Nullable String exchange, String routingKey, Message message)
RepublishMessageRecoverer
doSend
in class RepublishMessageRecoverer
exchange
- the exchange or null to use the template's default.routingKey
- the routing key.message
- the message.