Simple Text Oriented Messaging Protocol
STOMP provides an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers.

STOMP is simple

Simple (or Streaming) Text Oriented Message Protocol (STOMP), is a simple text-based protocol

Message-oriented Middleware

Designed for working with message-oriented middleware (MOM)

Interoperable wire format

It provides an interoperable wire format that allows STOMP clients to talk with any message broker supporting the protocol.

STOMP is language-agnostic

Any broker developed for one programming language or platform can receive communications from client software developed in another language.

Create Connection

// Create websocket client and set server options
oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := '';
oClient.Port := 15674;
oClient.Options.Parameters := '/ws';

// Create STOMP protocol and assign to websocket client
oSTOMP := TsgcWSPClient_STOMP.Create(nil);
oSTOMP.Client := oClient;

// STOMP Authentication
oSTOMP.Authentication.Enabled := True;
oSTOMP.Authentication.Username := 'sgc';
oSTOMP.Authentication.Password := 'sgc';

// Handle STOMP methods
oSTOMP.OnSTOMPConnect := OnSTOMPConnectHandler;
oSTOMP.OnSTOMPMessage := OnSTOMPMessageHandler;

// connect to server
oClient.Active := True;


// Subscribe to channel "myTopic"
oSTOMP.Subscribe('id0', 'myTopic');


// Send a message to all subscribers of channel "myTopic"
oSTOMP.Send('myTopic', 'Text message');


// Disconnect from server

STOMP provides an interoperable wire format that allows clients to communicate with almost every available message broker. STOMP is easy to implement and gives you flexibility since it is language-agnostic, meaning clients and brokers developed in different languages can send and receive messages to and from each other.