Skip to content

STOMP Operation Binding v0.1.0

The STOMP operation binding defines how AsyncAPI operations (publish and subscribe) are implemented over the STOMP protocol. This binding configures how messages are sent and received using STOMP frames and destinations.

STOMP operation bindings configure the behavior of publish and subscribe operations within the STOMP messaging system. Operations define how messages flow between publishers and subscribers using STOMP’s frame-based protocol and destination-based routing.

Property Type Required Description
bindingVersion string No Binding version (defaults to 0.1.0)

Specifies the version of the STOMP operation binding being used.

Default: 0.1.0

Note: This is the only property currently defined in the STOMP operation binding schema. The binding is designed to be minimal and focused on the core STOMP protocol capabilities.

Publish operations in STOMP represent sending messages to destinations:

  • SEND Frame: Used to send messages to specific destinations
  • Destination Routing: Messages are routed based on destination type (topic/queue)
  • Message Headers: STOMP headers provide metadata for message handling
  • Content Types: Support for various content types (JSON, XML, text, binary)

Subscribe operations in STOMP represent receiving messages from destinations:

  • SUBSCRIBE Frame: Used to subscribe to destinations for message consumption
  • Subscription Management: Unique subscription IDs for message tracking
  • Acknowledgment Modes: Different acknowledgment strategies (auto, client, client-individual)
  • Message Filtering: Support for selective message consumption

STOMP operations use these main frame types:

  • CONNECT: Establish connection to STOMP broker
  • SEND: Send message to destination
  • SUBSCRIBE: Subscribe to destination
  • UNSUBSCRIBE: Unsubscribe from destination
  • ACK/NACK: Acknowledge or reject messages
  • BEGIN/COMMIT/ABORT: Transaction management
  • DISCONNECT: Close connection
operations:
sendMessage:
bindings:
stomp:
bindingVersion: '0.1.0'
operations:
publishNews:
action: publish
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/NewsMessage'
operations:
subscribeToNews:
action: subscribe
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/NewsMessage'
channels:
chatChannel:
publish:
operationId: sendChatMessage
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/ChatMessage'
subscribe:
operationId: receiveChatMessage
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/ChatMessage'
channels:
orderChannel:
publish:
operationId: submitOrder
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/Order'
subscribe:
operationId: processOrder
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/Order'
channels:
systemEvents:
publish:
operationId: broadcastEvent
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/SystemEvent'
subscribe:
operationId: receiveEvent
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/SystemEvent'
channels:
apiRequest:
publish:
operationId: sendRequest
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/ApiRequest'
subscribe:
operationId: receiveResponse
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/ApiResponse'
channels:
newsChannel:
publish:
operationId: publishNews
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/NewsUpdate'
subscribe:
operationId: receiveNews
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/NewsUpdate'
channels:
dashboardChannel:
publish:
operationId: sendUpdate
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/DashboardUpdate'
subscribe:
operationId: receiveUpdate
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/DashboardUpdate'
channels:
deviceChannel:
publish:
operationId: sendCommand
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/DeviceCommand'
subscribe:
operationId: receiveStatus
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/DeviceStatus'
channels:
tradingChannel:
publish:
operationId: sendOrder
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/TradeOrder'
subscribe:
operationId: receiveMarketData
bindings:
stomp:
bindingVersion: '0.1.0'
message:
$ref: '#/components/messages/MarketData'
  • Use appropriate acknowledgment modes for your use case
  • Implement proper error handling for failed operations
  • Handle message ordering when required by your application
  • Use transactions for critical message operations
  • Implement proper connection lifecycle handling
  • Use connection pooling for high-throughput applications
  • Handle reconnection scenarios gracefully
  • Monitor connection health and performance
  • Use appropriate acknowledgment modes (auto vs client)
  • Implement message batching when possible
  • Monitor operation performance and throughput
  • Optimize message payload size
  • Use secure STOMP connections (STOMP over SSL/TLS)
  • Implement proper authentication and authorization
  • Validate all message content and headers
  • Protect against common messaging vulnerabilities
  • Implement proper error handling for failed operations
  • Use transactions for critical message operations
  • Handle message delivery failures gracefully
  • Log operation failures for debugging
  • Use unique subscription IDs for tracking
  • Implement proper subscription cleanup
  • Handle subscription failures gracefully
  • Monitor subscription health and performance
SEND
destination:/topic/news
content-type:application/json
content-length:123
{"headline":"Breaking News","content":"Important update..."}
SUBSCRIBE
id:news-subscription
destination:/topic/news
ack:auto
ACK
id:message-123
subscription:news-subscription
NACK
id:message-123
subscription:news-subscription
  • Initial release with basic STOMP operation binding support
  • Support for publish and subscribe operations
  • Minimal configuration focused on core STOMP capabilities
  • Schema validation for binding version