eubnara / study

6 stars 2 forks source link

what is STOMP? #147

Open eubnara opened 5 years ago

eubnara commented 5 years ago

https://stomp.github.io/stomp-specification-1.2.html

eubnara commented 5 years ago

I found the usage at https://github.com/hortonworks/ambari-release/tree/AMBARI-2.7.3.2-19-tag

eubnara commented 5 years ago

STOMP is a very simple and easy to implement protocol, coming from the HTTP school of design; the server side may be hard to implement well, but it is very easy to write a client to get yourself connected. For example you can use Telnet to login to any STOMP broker and interact with it!

The server side may be hard to implement well.

eubnara commented 5 years ago

STOMP 1.2 Released on 10/22/2012

eubnara commented 5 years ago

frame HTTP command optional headers / body text / binary encoding: UTF-8 / other

eubnara commented 5 years ago

STOMP

STOMP frames

A frame's structure

COMMAND
header1:value1
header2:value2

Body^@

Body

Connecting

Client Frames

SEND
SUBSCRIBE
UNSUBSCRIBE
BEGIN
COMMIT
ABORT
ACK
NACK
DISCONNECT

SEND frame

SEND
destination:/queue/a
content-type:text/plain

hello queue a
^@

SEND supports a transaction header which allows for transactional sends.

eubnara commented 5 years ago

참고: http://jmesnil.net/stomp-websocket/doc/

ambari 에서는 STOMP endpoint 가 다음과 같은데 왜 websocket 을 썼을까?

wss://{ambari_host_name}:8441/agent/stomp/v1