ARTEMIS-2289 SUBSCRIBE w/receipt returns 2 receipt-ids
This commit is contained in:
parent
8ca4b66e1d
commit
304ff79712
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
@ -97,6 +98,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);
|
||||
|
|
Loading…
Reference in New Issue