Configuring Connection Details

Solace PubSub+ Connection Details

The Spring Cloud Stream Binder for PubSub+ uses Spring Boot Auto-Configuration for the Solace Java API to configure its session. In the application.yml, this typically is configured as follows:

solace:
  java:
    host: tcp://localhost:55555
    msg-vpn: default
    client-username: default
    client-password: default	

For more information and options to configure the PubSub+ session, see Spring Boot Auto-Configuration for the Solace Java API

Preventing Message Loss when Publishing to Topic-to-Queue Mappings

If the connector is publishing to a topic that is subscribed to by a queue, messages may be lost if they are rejected. For example, if the queue ingress is shutdown.

To prevent message loss, configure the reject-msg-to-sender-on-discard with the including-when-shutdown flag.

Snowflake Connection Details

Manual Configuration

To manually configure Snowflake connection details, set the following in application.yml:

snowflake-binder:
  url: <locator>.<region>.snowflakecomputing.com:443
  username: snowflake_user
  role: ROLE
  private-key: "
    MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDmGWVuig8kvnE2
    HST+o4cGZi0k4vhMjLt3YbA2STw1P992NGh1sKGYVNR6ss4iOUb3B3lXCzeqNYpw
      .............
    lFWgnb6kKLqvC0jmQK+7ywR+mVULyIoRhYwJJtnDIRJyE8cJ9WNLyyAG1ISYfmS0
    8viks1HOzUSgnNii9zmigHLvyA==
  "

Connecting to Multiple Systems

To connect to multiple systems of a same type, use the multiple binder syntax.    

For example:

spring:
  cloud:
    stream:

      binders:
        solace1: # 1st solace binder in this example 
          type: solace
          environment: 
            solace: 
              java:
                host: tcp://localhost:55555
        solace2: # 2nd solace binder in this example 
          type: solace
          environment: 
            solace:
              java:
                host: tcp://other-host:55555
        snowflake1: # The only snowflake binder
          type: snowflake
          environment:
            snowflake-binder:
              # Add connection and binder properties here to customize behavior. 
        # Required for internal use
        undefined:
          type: undefined
 
      bindings: 
        input-0:
          destination: <input-destination>
          binder: solace1 # Reference 1st solace binder 
        output-0:
          destination: <output-destination> 
          binder: snowflake1
        input-1:
          destination: <input-destination>
          binder: solace2 # Reference 2nd solace binder 
        output-1:
          destination: <output-destination>
          binder: snowflake1

The configuration above defines two binders of type solace and one binder of type snowflake, which are then referenced within the bindings.

Each binder above is configured independently under spring.cloud.stream.binders.<bindername>.environment..

  • When connecting to multiple systems, all binder configuration must be specified using the multiple binder syntax for all binders. For example, under the spring.cloud.stream.binders.<binder-name>.environment.

  • Do not use single-binder configuration (for example, solace.java.* at the root of your application.yml) while using the multiple binder syntax.