Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/469#discussion_r60095912
--- Diff:
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
---
@@ -361,6 +362,13 @@ public void run() {
connection.getTransportConnection().setAutoRead(false);
}
+ QueueQueryResult result =
getCoreSession().executeQueueQuery(addresses[i]);
--- End diff --
We can change ServerSessionImpl::send as:
send(final ServerMessage message, final boolean direct, final boolean
expectedRouting) throws Exception
we can down the road, change PostOfficeImpl::route to add expectedRouting
parameter, and if the routeContext.getCount() == 0 and expectedRouting == true,
then throw the exception.
Better than run this expensive query through the bindings on every message
sent.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---