Unable to connect to Solace Event Broker Cloud

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

Looking at the documentation, I can explain how to configure the trust store with the complete certificate chain for connecting to PubSub+ Cloud using Python.

The key points are:

  1. When connecting securely to PubSub+ Cloud, you need to:

    • Download the trust store (DigiCert Root CA) from the “Connect” tab in the SMF section of your service
    • Configure the trust store path in your connection properties
  2. For Python, you can configure the trust store in two ways:

    a. Using Transport Security Strategy:

    from solace.messaging.config.transport_security_strategy import TLS
    
    transport_security_strategy = TLS.create().with_certificate_validation(True, False, "/path/to/truststore/")
    
    messaging_service = MessagingService.builder().from_properties(broker_props)\
                       .with_transport_security_strategy(transport_security_strategy)\
                       .build()
    

    b. Using broker properties:

    broker_props = {
        "solace.messaging.transport.host": "tcps://host:port",
        "solace.messaging.service.vpn-name": "vpn_name",
        "solace.messaging.authentication.scheme.basic.username": "username",
        "solace.messaging.authentication.scheme.basic.password": "password",
        "solace.messaging.tls.trust-store-path": "/path/to/truststore/DigiCert_Global_Root_CA.pem"
    }
    

Relevant documentation: