Class ErrorListenerDelegatingMessageBusExceptionHandler
- java.lang.Object
-
- de.quantummaid.eventmaid.messageBus.internal.exception.ErrorListenerDelegatingMessageBusExceptionHandler
-
- All Implemented Interfaces:
MessageBusExceptionHandler
public final class ErrorListenerDelegatingMessageBusExceptionHandler extends Object implements MessageBusExceptionHandler
-
-
Constructor Summary
Constructors Constructor Description ErrorListenerDelegatingMessageBusExceptionHandler()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.quantummaid.eventmaid.messageBus.exception.MessageBusExceptionHandler
callTemporaryExceptionListener
-
-
-
-
Method Detail
-
errorListenerDelegatingMessageBusExceptionHandler
public static ErrorListenerDelegatingMessageBusExceptionHandler errorListenerDelegatingMessageBusExceptionHandler(MessageBusExceptionHandler delegate, ExceptionListenerHandler exceptionListenerHandler)
-
shouldDeliveryChannelErrorBeHandledAndDeliveryAborted
public boolean shouldDeliveryChannelErrorBeHandledAndDeliveryAborted(ProcessingContext<Object> message, Exception e, Channel<Object> channel)
Description copied from interface:MessageBusExceptionHandlerIn some cases, anExceptionduring the delivery to aSubscribershould be ignored, so that the delivery is not stopped. Therefore for each exception during the delivery this method is invoked. Iftrueis returned, the delivery stopped, theMessageBusExceptionHandler.handleDeliveryChannelExceptionmethod is invoked and the message is marked as failed inChannelStatistics. Iffalseis returned, the exception is ignored and the delivery continues.- Specified by:
shouldDeliveryChannelErrorBeHandledAndDeliveryAbortedin interfaceMessageBusExceptionHandler- Parameters:
message- the message for which theExceptionwas throwne- the raisedExceptionchannel- theEventTypespecific channel, in which the message was delivered- Returns:
trueif the exception should be handled,falseotherwise
-
handleDeliveryChannelException
public void handleDeliveryChannelException(ProcessingContext<Object> message, Exception e, Channel<Object> channel)
Description copied from interface:MessageBusExceptionHandlerFor eachExceptionthrown inside aSubscriber, for whichMessageBusExceptionHandler.shouldDeliveryChannelErrorBeHandledAndDeliveryAbortedreturnedtrue, this method is invoked.- Specified by:
handleDeliveryChannelExceptionin interfaceMessageBusExceptionHandler- Parameters:
message- the message, which caused theExceptione- the raisedExceptionchannel- the deliveryChannel
-
handleFilterException
public void handleFilterException(ProcessingContext<Object> message, Exception e, Channel<Object> channel)
Description copied from interface:MessageBusExceptionHandlerWhen aExceptioninside aFilteris thrown, this method is invoked.- Specified by:
handleFilterExceptionin interfaceMessageBusExceptionHandler- Parameters:
message- the message that caused theExceptione- the raisedExceptionchannel- the acceptingChannel
-
-