Skip to main content
Version: 5.1

Solace (JMS)

Solace (JMS) event integrations consume messages from a Solace PubSub+ queue or topic and trigger event handlers as each message arrives. The trigger is built on the standard Java Message Service (JMS) 2.0 API. Use it when you want portable, spec-compliant JMS session semantics — SQL-92 message selectors, standard JMS acknowledgement modes, and session-transacted messaging — instead of Solace's native JCSMP API used by the Solace event integration.

Creating a Solace (JMS) 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 (JMS) under Event Integration.

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

    Create Solace (JMS) Event Integration formCreate Solace (JMS) Event Integration form
    FieldDescriptionDefault
    Listener NameIdentifier for the listener created with this service.jmsListener
    Broker URLThe Solace broker URL in the format [protocol:]host[:port]. Supported schemes: smf (plain-text) and smfs (TLS).smf://localhost:55555
    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 JMS session acknowledgement mode. Options: Auto Acknowledge, Client Acknowledge, Duplicates OK Acknowledge, Session Transacted.Auto Acknowledge

    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 unless Enable Dynamic Durables is on.

    When Destination is Topic:

    FieldDescriptionDefault
    Topic NameThe topic to subscribe to.Required
    DurabilityTemporary for a non-durable subscription, or Durable for a durable topic subscription.Temporary
    Subscriber NameThe durable subscription name. Required when Durability is Durable.—

    Expand Advanced Configurations to set secureSocket, clientName, clientDescription, enableDynamicDurables, directTransport, directOptimized, compressionLevel, localhost, connectTimeout, readTimeout, retryConfig, transportWindowSize, ackThreshold, and ackTimer. The last three only apply when directTransport is off.

  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 (JMS) Event Integration canvasService Designer showing the Solace (JMS) 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 (JMS) Event Integration Configuration panel. Select Solace (JMS) Event Integration in the left panel.

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

Queue service configuration fields:

FieldDescriptionDefault
queueNameName of the queue to consume from.Required
ackModeJMS session acknowledgement mode: AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, or SESSION_TRANSACTED.AUTO_ACKNOWLEDGE
messageSelectorJMS SQL-92 message selector expression.—

Topic service configuration fields:

FieldDescriptionDefault
topicNameName of the topic to subscribe to.Required
durabilityTEMPORARY for a non-durable subscription, or DURABLE for a durable topic subscription.TEMPORARY
subscriberNameDurable subscription name. Required when durability is DURABLE.—
ackModeJMS session acknowledgement mode: AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, or SESSION_TRANSACTED.AUTO_ACKNOWLEDGE
messageSelectorJMS SQL-92 message selector expression. Not supported on a direct (non-directTransport: false) topic subscription.—

Listener configuration​

In the Solace (JMS) Event Integration Configuration panel, select jmsListener under Attached Listeners to configure the listener.

FieldDescriptionDefault
NameIdentifier for the listener.jmsListener
UrlThe Solace broker URL in the format [protocol:]host[:port]. Supported schemes: smf (plain-text) and smfs (TLS).smf://localhost:55555
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 JMS Connector
Enable Dynamic DurablesAutomatically provision durable destinations that don't already exist on the broker.Disabled
Direct TransportConsume over direct (at-most-once) transport. Turn off for session-transacted services or flow-control tuning.Enabled
Direct OptimizedOptimize the session for direct messaging throughput.Enabled
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.—
Transport Window SizeMaximum number of guaranteed messages in flight, unacknowledged (1–255). Only applies when Direct Transport is off.—
Ack ThresholdPercentage of Transport Window Size consumed before an automatic acknowledgement is sent (1–75). Only applies when Direct Transport is off.60
Ack TimerMaximum time in seconds to hold an unacknowledged message before sending an automatic acknowledgement (0.02–1.5). Only applies when Direct Transport is off.—

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:

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
onErrorA message receipt or data-binding error occursLogging failures and triggering alerts

What's next​

  • Solace — consume messages from Solace PubSub+ using the native JCSMP API
  • Kafka — consume messages from Apache Kafka topics
  • RabbitMQ — consume messages from RabbitMQ queues
  • Connections — reuse Solace connection credentials across services