From 1e18cf2d716751a0a049bf2057100fe4f8df27ba Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Fri, 29 Jun 2012 20:26:32 +0000 Subject: [PATCH] Adds a method to allow for sending a receipt on disconnect send. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1355553 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/transport/stomp/StompConnection.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java index 9aeeb7574a..3ed819754c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/stomp/StompConnection.java @@ -137,7 +137,14 @@ public class StompConnection { } public void disconnect() throws Exception { + disconnect(null); + } + + public void disconnect(String receiptId) throws Exception { StompFrame frame = new StompFrame("DISCONNECT"); + if (receiptId != null && !receiptId.isEmpty()) { + frame.getHeaders().put(Stomp.Headers.RECEIPT_REQUESTED, receiptId); + } sendFrame(frame.format()); }