This is an automated email from the ASF dual-hosted git repository.

gaohoward pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new 304ff79  ARTEMIS-2289 SUBSCRIBE w/receipt returns 2 receipt-ids
     new 279f655  This closes #2600
304ff79 is described below

commit 304ff797123be2f79db1abfdccd9b2374202a371
Author: Justin Bertram <jbert...@apache.org>
AuthorDate: Sat Mar 30 14:36:02 2019 -0500

    ARTEMIS-2289 SUBSCRIBE w/receipt returns 2 receipt-ids
---
 .../core/protocol/stomp/VersionedStompFrameHandler.java       |  3 ---
 .../artemis/tests/integration/stomp/v12/StompV12Test.java     | 11 +++++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
 
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
index 75c1ea3..bac1c24 100644
--- 
a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
+++ 
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/VersionedStompFrameHandler.java
@@ -126,9 +126,6 @@ public abstract class VersionedStompFrameHandler {
       try {
          StompPostReceiptFunction postProcessFunction = onSubscribe(request);
          response = postprocess(request);
-         if (request.hasHeader(Stomp.Headers.RECEIPT_REQUESTED)) {
-            response.addHeader(Stomp.Headers.Response.RECEIPT_ID, 
request.getHeader(Stomp.Headers.RECEIPT_REQUESTED));
-         }
          connection.sendFrame(response, postProcessFunction);
          return null;
       } catch (ActiveMQStompException e) {
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
index e3b61b3..3e6e46c 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java
@@ -33,6 +33,7 @@ import java.util.UUID;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.regex.Pattern;
 
 import org.apache.activemq.artemis.api.core.RoutingType;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -98,6 +99,16 @@ public class StompV12Test extends StompTestBase {
    }
 
    @Test
+   public void testSubscribeWithReceipt() throws Exception {
+      conn.connect(defUser, defPass);
+
+      Pattern p = Pattern.compile("receipt-id:.*\\nreceipt-id");
+      assertFalse(p.matcher(subscribe(conn, null).toString()).find());
+
+      conn.disconnect();
+   }
+
+   @Test
    public void testConnection() throws Exception {
       server.getSecurityStore().setSecurityEnabled(true);
       StompClientConnection connection = 
StompClientConnectionFactory.createClientConnection(v10Uri);

Reply via email to