Skip to content

Solace Operation Binding v0.4.0

The Solace operation binding is the most detailed and important binding for defining behavior in a Solace-based API. It specifies the array of destinations that a message will be sent to or received from.

Overview

This binding allows you to define a list of destinations for a single operation. Each destination can be a queue or a direct topic subscription. This is critical for describing common Solace patterns, such as publishing a message that is consumed by multiple durable queues and also by direct, real-time subscribers.

Operation Properties

PropertyTypeRequiredDescription
bindingVersionstringNoBinding version (defaults to 0.4.0).
destinationsarrayNoAn array of destination objects.
timeToLiveintegerNoLifetime of the message in milliseconds.
priorityintegerNoMessage priority from 0 to 255.
dmqEligiblebooleanNoIf true, the message can be moved to a Dead Message Queue. Defaults to false.

Destination Object

Each object in the destinations array defines a single destination.

PropertyTypeRequiredDescription
destinationTypestringYesqueue or topic.
deliveryModestringNodirect or persistent. Defaults to direct.
queueobjectNoA queue object, required if destinationType is queue.
topicSubscriptionsarrayNoA list of topic subscriptions for a topic destination.

Destination Property Details

  • destinationType:
    • queue: The destination is a durable queue that spools messages.
    • topic: The destination is a direct topic subscription for non-durable, real-time delivery.
  • deliveryMode:
    • direct: At-most-once delivery. Low latency, high throughput.
    • persistent: At-least-once delivery (guaranteed). Messages are spooled to the destination.

Queue Object

The queue object is used when destinationType is queue.

PropertyTypeRequiredDescription
namestringNoThe name of the queue.
topicSubscriptionsarrayNoA list of topic subscriptions that the queue listens to.
accessTypestringNoexclusive or nonexclusive. Defines how consumers access the queue.
maxMsgSpoolUsagestringNoMaximum spool usage for the queue (e.g., "100MB").
maxTtlstringNoMaximum time-to-live for messages spooled to the queue (e.g., "3600s").

Examples

Guaranteed Publishing to a Queue

This operation sends a persistent message to a queue named q_user_updates, which subscribes to a specific topic.

yaml
operations:
  sendUserUpdate:
    action: send
    bindings:
      solace:
        bindingVersion: '0.4.0'
        destinations:
          - destinationType: 'queue'
            deliveryMode: 'persistent'
            queue:
              name: 'q_user_updates'
              topicSubscriptions:
                - 'user/signedup'

Consuming from Multiple Destinations

This operation describes a consumer that binds to a durable queue for guaranteed delivery but also subscribes directly to a topic for real-time, non-persistent alerts.

yaml
operations:
  receiveCriticalEvents:
    action: receive
    bindings:
      solace:
        bindingVersion: '0.4.0'
        destinations:
          - destinationType: 'queue'
            deliveryMode: 'persistent'
            queue:
              name: 'q_critical_events'
              topicSubscriptions:
                - 'events/critical/>'
          - destinationType: 'topic'
            deliveryMode: 'direct'
            topicSubscriptions:
                - 'events/alerts/realtime'

Changelog

Version 0.4.0

  • Refined the structure for destinations array.
  • Clarified the relationship between destinationType, deliveryMode, queue, and topicSubscriptions.