stomp消息傳輸框架
Stomp 提供了客戶端和代理之間進(jìn)行廣泛消息傳輸?shù)目蚣?。Stomp 是一個(gè)非常簡(jiǎn)單而且易用的通訊協(xié)議實(shí)現(xiàn),盡管代理端的編寫(xiě)可能非常復(fù)雜,但是編寫(xiě)一個(gè) Stomp 客戶端卻是很簡(jiǎn)單的事情,另外你可以使用 Telnet 來(lái)與你的 Stomp 代理進(jìn)行交互。
用法示例:
client = Stomp::Client.new("test", "user", "localhost", 61613)
client.send("/my/queue", "hello world!")
client.subscribe("/my/queue") do |msg|
p msg
end評(píng)論
圖片
表情
