Class BlockingRetryErrorHandler
java.lang.Object
com.broadleafcommerce.common.messaging.retry.blocking.BlockingRetryErrorHandler
- All Implemented Interfaces:
Consumer<org.springframework.messaging.support.ErrorMessage>
public class BlockingRetryErrorHandler
extends Object
implements Consumer<org.springframework.messaging.support.ErrorMessage>
Error handler for the blocking retry case. Only applies to the in-memory Spring retry case after
all retry attempts have been exhausted. Does not apply in kafka when
BlockingFixedRetryInfo.Kafka.isSeekToCurrentRecordOnFailure()
is true, in which case,
DefaultErrorHandler
and KafkaBlockingRetryDeadLetterRecoverer
are in play
instead.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBlockingRetryErrorHandler
(String originalConsumerBinding, String group, BlockingRetryProperties blockingRetryProperties, com.broadleafcommerce.common.extension.compatibility.support.messaging.TimeoutAwareStreamBridge streamBridge, org.springframework.core.convert.converter.Converter<String, String> traceTruncator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(org.springframework.messaging.support.ErrorMessage errorMessage) protected Exception
Retrieve the relevant root exception for reporting as a header on the messageprotected void
sendToDlq
(BlockingFixedRetryInfo info, org.springframework.messaging.support.ErrorMessage errorMessage, org.springframework.messaging.Message<?> original) Send the message to the DLQ.
-
Constructor Details
-
BlockingRetryErrorHandler
public BlockingRetryErrorHandler(String originalConsumerBinding, String group, BlockingRetryProperties blockingRetryProperties, com.broadleafcommerce.common.extension.compatibility.support.messaging.TimeoutAwareStreamBridge streamBridge, org.springframework.core.convert.converter.Converter<String, String> traceTruncator)
-
-
Method Details
-
accept
public void accept(org.springframework.messaging.support.ErrorMessage errorMessage) -
sendToDlq
protected void sendToDlq(BlockingFixedRetryInfo info, org.springframework.messaging.support.ErrorMessage errorMessage, org.springframework.messaging.Message<?> original) Send the message to the DLQ.- Parameters:
info
- The blocking retry configurationerrorMessage
- The failed messageoriginal
- The original message
-
getRoot
Retrieve the relevant root exception for reporting as a header on the message- Parameters:
e
- The exception- Returns:
- The relevant root exception
-