[
https://issues.apache.org/jira/browse/ARTEMIS-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16588539#comment-16588539
]
ASF GitHub Bot commented on ARTEMIS-2044:
-----------------------------------------
Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2258#discussion_r211868062
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/ActiveMQServerMessagePlugin.java
---
@@ -128,6 +143,21 @@ default void afterMessageRoute(Message message,
RoutingContext context, boolean
}
+ /**
+ * When there was an error routing the message
+ *
+ * @param message
+ * @param context
+ * @param direct
+ * @param rejectDuplicates
+ * @param e the exception that occurred during message routing
+ * @throws ActiveMQException
+ */
+ default void onMessageRouteError(Message message, RoutingContext
context, boolean direct, boolean rejectDuplicates,
--- End diff --
Nit: onMessageRouteException
> Add broker plugin methods to handle errors during "send"/"route" operations
> ---------------------------------------------------------------------------
>
> Key: ARTEMIS-2044
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2044
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Carsten Lohmann
> Priority: Major
>
> In the {{ActiveMQServerMessagePlugin}} class, there are the "beforeSend" and
> "afterSend" methods for getting notified about the sending of a message.
> There is no method for being notified on when there was an error sending the
> message, though. This would be something like an "onSendError" method.
> Same applies to "beforeMessageRoute"/"afterMessageRoute".
> (An "onDeliverError" method wouldn't fit here since "afterDeliver" is being
> called in a "finally" block, hence also in case of an exception).
>
> So it would be good to have methods like "onSendError" and
> "onMessageRouteError" in {{ActiveMQServerMessagePlugin}}.
> This is needed for implementing OpenTracing support via a broker plugin - see
> ARTEMIS-2028.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)