开发者

STOMP Protocol - Session ID Questions

开发者 https://www.devze.com 2023-02-14 15:30 出处:网络
From the STOMP 1.0 protocol description (http://stomp.github.com/stomp-specification-1.0.html) (emphasis mine):

From the STOMP 1.0 protocol description (http://stomp.github.com/stomp-specification-1.0.html) (emphasis mine):

After the client sends the CONNECT frame, the server will always acknowledge the connection by sending a frame which looks like:

CONNECTED session:

^@

session-id header is a unique identifier for this session (though it isn't actually used yet).

Questions:

1) I would assume that the session-id value returned after connecting is unique for each connection between a STOMP client and broker. However, since the above description 开发者_JAVA百科uses the separate terms "connection" and "session", this isn't necessarily the case. Is there any documentation to explain the relationship between session-id and connections to the server or can someone confirm my assumption?

2) Is there any documentation available for the format of the session-id value?

My Google searching for answers to these questions didn't reveal any useful information. I also tried looking at the source code for ActiveMQ 5.4.2 (the broker I'm using), but didn't find any obvious information there either.

Although Question 1 is probably splitting hairs, I'm planning to use the session-id value for a customer's product and would really prefer to know rather than assume how STOMP behaves.

Thanks in advance for your help.

-John


Session and Connection are being treated equally. The session-id header that ActiveMQ gives you will be a globally unique id every time you connect.

0

精彩评论

暂无评论...
验证码 换一张
取 消