Skip to main content

Solace

Solace event integrations consume messages from a Solace PubSub+ queue or topic and trigger event handlers as each message arrives. The listener is built on the Solace JCSMP API. Use it for high-performance event streaming in financial services, IoT, and real-time analytics workloads that require guaranteed or direct message delivery.

Creating a Solace events service​

  1. Click + Add Artifact in the canvas or click + next to Entry Points in the sidebar.

  2. In the Artifacts panel, select Solace under Event Integration.

  3. In the creation form, fill in the following fields:

    Solace Event Integration creation formSolace Event Integration creation form
    FieldDescriptionDefault
    Listener NameIdentifier for the listener created with this service.solaceListener
    Broker URLThe Solace broker URL in the format [protocol:]host[:port].tcp://localhost:55554
    Message VPNThe message VPN to connect to.default
    Authentication configurationHow to authenticate with the broker. Select Basic Authentication, Kerberos Authentication, or OAuth 2.0 Authentication.Basic Authentication
    DestinationWhether to consume from a Queue or a Topic.Queue
    Acknowledgement ModeThe JCSMP message acknowledgement mode. Options: Auto Ack, Client Ack.Auto Ack

    Basic Authentication fields:

    FieldDescription
    UsernameUsername for broker authentication.
    PasswordPassword for broker authentication.

    Kerberos Authentication fields:

    FieldDescriptionDefault
    Service NameKerberos service name.solace
    JAAS Login ContextJAAS login context name.SolaceGSS
    Mutual AuthenticationEnable Kerberos mutual authentication.Disabled
    JAAS Config File Reload EnabledEnable automatic reload of the JAAS configuration file.Disabled

    OAuth 2.0 Authentication fields:

    FieldDescription
    IssuerOAuth 2.0 issuer identifier URI.
    Access TokenOAuth 2.0 access token. Provide this or an OIDC token.
    OIDC TokenOpenID Connect ID token. Provide this or an access token.

    When Destination is Queue:

    FieldDescription
    Queue NameThe durable queue to consume messages from. The queue must already exist on the broker; it isn't created automatically.

    When Destination is Topic:

    FieldDescriptionDefault
    Topic NameThe topic to subscribe to.Required
    DurabilityTemporary for a direct, at-most-once subscription, or Durable for a durable topic endpoint.Temporary
    Endpoint NameThe durable topic endpoint name. Required when Durability is Durable.—

    Expand Advanced Configurations to set secureSocket, clientName, clientDescription, transacted, compressionLevel, localhost, connectTimeout, readTimeout, and retryConfig.

  4. Click Create.

  5. WSO2 Integrator opens the service in the Service Designer. The canvas shows the attached listener pill, the queue or topic name pill, and an empty Event Handlers section.

    Service Designer showing the Solace Event Integration canvasService Designer showing the Solace Event Integration canvas
  6. Click + Add Handler to add event handlers.

Service configuration​

In the Service Designer, click the Configure icon in the header to open the Solace Event Integration Configuration panel. Select Solace Event Integration in the left panel.

Solace Event Integration Configuration panel — ServiceConfig expression and listener configurationSolace Event Integration Configuration panel — ServiceConfig expression and listener configuration

The ServiceConfig field accepts a record expression that sets the destination and message handling options.

Queue service configuration fields:

FieldDescriptionDefault
queueNameName of the durable queue to consume from.Required
ackModeMessage acknowledgement mode: AUTO_ACK or CLIENT_ACK.AUTO_ACK
messageSelectorSQL-92 message selector expression.—
transportWindowSizeMaximum number of guaranteed messages in flight, unacknowledged.255
ackThresholdPercentage of transportWindowSize consumed before an automatic acknowledgement is sent.60
reconnectTriesNumber of reconnection attempts after a flow failure. -1 retries indefinitely.-1
reconnectRetryIntervalDelay in seconds between reconnection attempts.3.0

Topic service configuration fields:

FieldDescriptionDefault
topicNameName of the topic to subscribe to.Required
durabilityTEMPORARY for a direct subscription, or DURABLE for a durable topic endpoint.TEMPORARY
endpointNameDurable topic endpoint name. Required when durability is DURABLE.—
ackModeMessage acknowledgement mode: AUTO_ACK or CLIENT_ACK.AUTO_ACK

Listener configuration​

In the Solace Event Integration Configuration panel, select solaceListener under Attached Listeners to configure the listener.

FieldDescriptionDefault
NameIdentifier for the listener.solaceListener
UrlThe Solace broker URL in the format [protocol:]host[:port]. Supported schemes: tcp (plain-text) and tcps (TLS/SSL).tcp://localhost:55554
Message VpnThe name of the message VPN to connect to.default
AuthAuthentication configuration. Supports basic authentication, Kerberos, and OAuth 2.0.Required
Secure SocketTLS/SSL configuration for secure connections.—
Client NameClient identifier reported to the broker. A unique name is generated when omitted.—
Client DescriptionHuman-readable description of the client connection.Ballerina Solace Connector
TransactedEnables a transacted session shared by every service attached to this listener. Requires ackMode: CLIENT_ACK on each service.false
Compression LevelZLIB compression level. Valid range is 0–9, where 0 disables compression.0
LocalhostLocal interface IP address to bind for outbound connections.—
Connect TimeoutConnection timeout, in seconds.30.0
Read TimeoutRead timeout, in seconds.10.0
Retry ConfigReconnection retry configuration.—
Generate Receive TimestampsPopulate receiveTimestamp on every message delivered to a service.false
Calculate Message ExpirationPopulate expiration on every message delivered to a service.false

Click + Attach Listener to attach an additional listener to the same service.

Click Save Changes to apply updates.

Event handlers​

Adding an event handler​

In the Service Designer, click + Add Handler. The Select Handler to Add panel lists onMessage and onError.

onMessage — opens a configuration panel before saving:

onMessage handler configuration panelonMessage handler configuration panel
OptionDescription
Define ValueDefine the expected payload type of the incoming message, either by creating a new type schema or reusing an existing one.

Click Save to add the handler.

onError — added directly without additional configuration.

Handler types​

HandlerTriggered whenUse when
onMessageA new message arrives from the queue or topicProcessing incoming messages
onErrorMessage receipt or data binding fails, or onMessage returns an errorLogging failures and triggering alerts

What's next​

  • Solace (JMS) — consume messages from Solace PubSub+ using the standard JMS API
  • Kafka — consume messages from Apache Kafka topics
  • RabbitMQ — consume messages from RabbitMQ queues
  • Connections — reuse Solace connection credentials across services