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 767527e257..a21d0fde9b 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 @@ -241,6 +241,12 @@ public class StompConnection { sendFrame(frame.format()); } + public void keepAlive() throws Exception { + OutputStream outputStream = stompSocket.getOutputStream(); + outputStream.write('\n'); + outputStream.flush(); + } + protected String appendHeaders(HashMap headers) { StringBuilder result = new StringBuilder(); for (String key : headers.keySet()) {