Sending json message using Python to queue using certificate authentication

Hey Parvin! I’m not quite sure what you mean by sending a message using certificate authentication. Are you referring to connecting to a Solace broker using certificate authentication? Or are you referring to sending messages to a queue? And what API are you using to connect to the broker?

Options to connect to the broker using Python

  1. MQTT: you can use paho mqtt to connect to the broker. For certificate connection, all you need to do it client.tls_set(ca_certs="path_to_.pem_cert")
  2. Solace API: you will need to add this configuration property in your broker config prior connecting to the broker "solace.messaging.tls.trust-store-path": "path_to_.pem_cert"

Sending messages

Regardless the option you choose to connect to the broker, you can a JSON formatted body in the message. If you are sending messages on a topic, you can configure your queue on the broker to subscribe to a topic and it will receive the messages with the json body payload you sent from your application