clebertsuconic commented on a change in pull request #2974: ARTEMIS-2607 
interceptor returns false but processing continues
URL: https://github.com/apache/activemq-artemis/pull/2974#discussion_r377271786
 
 

 ##########
 File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
 ##########
 @@ -507,8 +507,9 @@ private void serverSend(final ProtonServerReceiverContext 
context,
                            final Receiver receiver,
                            final RoutingContext routingContext) throws 
Exception {
       
message.setConnectionID(receiver.getSession().getConnection().getRemoteContainer());
-      invokeIncoming((AMQPMessage) message, (ActiveMQProtonRemotingConnection) 
transportConnection.getProtocolConnection());
-      serverSession.send(transaction, message, directDeliver, false, 
routingContext);
+      if (invokeIncoming((AMQPMessage) message, 
(ActiveMQProtonRemotingConnection) transportConnection.getProtocolConnection()) 
== null) {
+         serverSession.send(transaction, message, directDeliver, false, 
routingContext);
+      }
 
       afterIO(new IOCallback() {
 
 Review comment:
   this is one of the reasons it was never captured at this point. but if you 
decide to take the outcome of the interceptor into consideration, then you need 
proper cancellations at the send.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to