This closes #77 Stomp changes
This commit is contained in:
commit
f414c441f2
|
@ -91,6 +91,7 @@ public class ActiveMQStompException extends Exception
|
|||
|
||||
if (body != null)
|
||||
{
|
||||
frame.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
|
||||
frame.setByteBody(body.getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
else
|
||||
|
|
|
@ -211,6 +211,7 @@ public class StompSession implements SessionCallback
|
|||
if (stompSubscription != null)
|
||||
{
|
||||
StompFrame frame = connection.getFrameHandler().createStompFrame(Stomp.Responses.ERROR);
|
||||
frame.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
|
||||
frame.setBody("consumer with ID " + consumerId + " disconnected by server");
|
||||
connection.sendFrame(frame);
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements
|
|||
// not valid
|
||||
response = createStompFrame(Stomp.Responses.ERROR);
|
||||
response.setNeedsDisconnect(true);
|
||||
response.addHeader(Stomp.Headers.CONTENT_TYPE, "text/plain");
|
||||
response.addHeader(Stomp.Headers.Error.MESSAGE, "Failed to connect");
|
||||
response.setBody("The login account is not valid.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue