From 22f4736c8884c4e42be76cc85ab0f076a4f7d990 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Thu, 18 May 2017 08:40:35 +0100 Subject: [PATCH] ARTEMIS-1169 - Implement Interceptors for the AMQP protocol Add Outgoing call https://issues.apache.org/jira/browse/ARTEMIS-1169 --- .../artemis/protocol/amqp/broker/AMQPSessionCallback.java | 1 + .../tests/integration/amqp/AmqpSendReceiveInterceptorTest.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java index 6ba0ab5865..4b26d79185 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java @@ -567,6 +567,7 @@ public class AMQPSessionCallback implements SessionCallback { ProtonServerSenderContext plugSender = (ProtonServerSenderContext) consumer.getProtocolContext(); try { + invokeOutgoing((AMQPMessage) message, (ActiveMQProtonRemotingConnection) transportConnection.getProtocolConnection()); return plugSender.deliverMessage(ref, deliveryCount); } catch (Exception e) { connection.lock(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveInterceptorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveInterceptorTest.java index 54ff451c99..beb6a882b3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveInterceptorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpSendReceiveInterceptorTest.java @@ -70,7 +70,7 @@ public class AmqpSendReceiveInterceptorTest extends AmqpClientTestSupport { receiver.flow(2); AmqpMessage amqpMessage = receiver.receive(5, TimeUnit.SECONDS); assertNotNull(amqpMessage); - assertEquals(latch.getCount(), 0); + assertEquals(latch2.getCount(), 0); receiver.close(); connection.close(); }