I'm having trouble getting custom destinations to work with Spring STOMP websites.
It seems to work for me the general configuration. For example, the following work.
Customer:
svc.stompClient.subscribe('/queue/messages', msg );
Server:
stompTemplate.convertAndSend("/queue/messages", msg);
However, when I try to send to a specific user destination as follows:
Customer:
svc.stompClient.subscribe('/user/queue/messages', msg );
Server:
stompTemplate.convertAndSendToUser(username, "/queue/messages", msg);
... Nothing happens.
I installed listeners SessionConnectedEventand SessionSubscribeEventthat show:
SessionConnectedEvent[GenericMessage [
payload=byte[0],
headers={
simpMessageType=CONNECT_ACK,
simpConnectMessage=GenericMessage [
payload=byte[0],
headers={
simpMessageType=CONNECT,
stompCommand=CONNECT,
nativeHeaders={
accept-version=[1.1,1.0],
heart-beat=[10000,10000]
},
simpSessionAttributes={},
simpSessionId=erlz0dm6
}
],
simpSessionId=erlz0dm6
}
]]
SessionSubscribeEvent[GenericMessage [
payload=byte[0],
headers={
simpMessageType=SUBSCRIBE,
stompCommand=SUBSCRIBE,
nativeHeaders={
id=[sub-0],
destination=[/user/queue/messages]
},
simpSessionAttributes={},
simpSubscriptionId=sub-0,
simpSessionId=erlz0dm6,
simpDestination=/user/queue/messages
}
]]
And on the client side, I see the following:
>>> SUBSCRIBE
id:sub-0
destination:/user/queue/messages
Tracing the method in some way sendToUser, I see that it passes to the /user/myusername/queue/messagestarget recognizer. However, nothing else is registered on the server, and the client does not receive the message.
Therefore, I want to determine:
- Are there any debugging protocols that I can enable that can help diagnose the problem?
- , ?
, , - (, ), , . , .
:
- Spring 1.2.1 ( 1.0.8. , , .)
- sockjs-client 0.3.4
- stomp-websocket 2.3.1
, , , PreAuthenticatedAuthenticationProvider HttpServletRequestWrapper, , , , Principal. Active Directory.
. , . " " - , .