From 51f125387bbcb4b6b68276450c0e87385b17298f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 27 Jan 2016 19:09:19 +0200 Subject: [PATCH] Add "persistent" header to outbound STOMP messages --- .../org/apache/activemq/artemis/core/protocol/stomp/Stomp.java | 2 ++ .../apache/activemq/artemis/core/protocol/stomp/StompUtils.java | 1 + 2 files changed, 3 insertions(+) diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/Stomp.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/Stomp.java index 59a6916a36..160766689b 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/Stomp.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/Stomp.java @@ -123,6 +123,8 @@ public interface Stomp { String SUBSCRIPTION = "subscription"; String ACK = "ack"; + + String PERSISTENT = "persistent"; } public interface Subscribe { diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompUtils.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompUtils.java index 2acd74fe78..d27a4bc63f 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompUtils.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompUtils.java @@ -92,6 +92,7 @@ public class StompUtils { command.addHeader(Stomp.Headers.Message.EXPIRATION_TIME, "" + message.getExpiration()); command.addHeader(Stomp.Headers.Message.REDELIVERED, String.valueOf(deliveryCount > 1)); command.addHeader(Stomp.Headers.Message.PRIORITY, "" + message.getPriority()); + command.addHeader(Stomp.Headers.Message.PERSISTENT, "" + message.isDurable()); if (message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME) != null) { command.addHeader(Stomp.Headers.Message.REPLY_TO, message.getStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME)); }