---
title: "STOMP protocol"
author: "garyli"
date: "2013-12-18T00:41:15Z"
tags: []
categories: ["互联网"]
slug: "stomp-protocol"
draft: false
lastmod: "2013-12-18T00:41:15Z"
id: 1991152
url: "https://garyli.iteye.com/blog/1991152"
---

STOMP，Streaming Text Orientated Message Protocol，是流文本定向消息协议，是一种为MOM(Message Oriented Middleware，面向消息的中间件)设计的简单文本协议。

它提供了一个可互操作的连接格式，允许STOMP客户端与任意STOMP消息代理(Broker)进行交互，类似于OpenWire(一种二进制协议)。

由于其设计简单，很容易开发客户端，因此在多种语言和多种平台上得到广泛应用。其中最流行的STOMP消息代理是Apache ActiveMQ。

STOMP协议工作于TCP协议之上，使用了下列命令：

    * SEND 发送  
    * SUBSCRIBE 订阅  
    * UNSUBSCRIBE 退订  
    * BEGIN 开始  
    * COMMIT 提交  
    * ABORT 取消  
    * ACK 确认  
    * DISCONNECT 断开