Open rworsnop opened 10 years ago
Hello - when do you think to release Stampy with this fix (if ever)?
To workaround I have to override the postHeader()
method which actually writes the body??
gateway.connect();
Thread.sleep(1000L);
HostPort hostPort = gateway.getConnectedHostPorts().iterator().next();
gateway.sendMessage(new ConnectMessage("1.2", "localhost") {
@Override
protected String postHeader() {
return "";
}
}, hostPort);
Then I can connect but I don't get message callbacks yet.
This is a dead project. No commits since Feb 2013. There's a pull request for this issue, but it was never merged: https://github.com/mrstampy/Stampy/pull/9 I ended up switching to Spring's STOMP support instead - and then noticed some behavior differences that were due to other Stampy bugs.
Looks that way. I added the work around in case anyone else was reading this.
Cheers for the Spring heads-up I did not know they had STOMP support.
Yep - I was able to do everything I wanted to do using these classes: https://github.com/spring-projects/spring-framework/tree/master/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp
If a message doesn't have a body (e.g., "CONNECT"), toStompMessage includes the text "null" in the String.
The line "builder.append(body);" should be surrounded with a null check.