ARTEMIS-1633 - Include populated RoutingContext in beforeMessageRoute

call

There was a small bug in the previous commit, the beforeMessageRoute
callback was being executed too early so the RoutingCountext wasn't
being filled in
This commit is contained in:
Christopher L. Shannon (cshannon) 2018-02-08 07:07:33 -05:00
parent 4883b0360e
commit 33b265ca6b
1 changed files with 4 additions and 4 deletions

View File

@ -809,10 +809,6 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
message.cleanupInternalProperties();
if (server.hasBrokerPlugins()) {
server.callBrokerPlugins(plugin -> plugin.beforeMessageRoute(message, context, direct, rejectDuplicates));
}
Bindings bindings = addressManager.getBindingsForRoutingAddress(context.getAddress(message));
// TODO auto-create queues here?
@ -836,6 +832,10 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
}
}
if (server.hasBrokerPlugins()) {
server.callBrokerPlugins(plugin -> plugin.beforeMessageRoute(message, context, direct, rejectDuplicates));
}
if (logger.isTraceEnabled()) {
logger.trace("Message after routed=" + message);
}