I have service created on Loading... on GCP platform and I am trying to connect to this service from python 3.7 using solace-pubsubplus pypi package: solace-pubsubplus · PyPI
Here is my code snippet for connecting to the service:
_def publish(message):
import solace.messaging.messaging_service as service
from solace.messaging.publisher.outbound_message import OutboundMessageBuilder
from solace.messaging.publisher.persistent_message_publisher import Topic
broker_props = {"solace.messaging.transport.host": "https://mr-b7hnxi2xr1c.messaging.solace.cloud:9443",
"solace.messaging.service.vpn-name": "test-event-service",
"solace.messaging.authentication.scheme.basic.username": "solace-cloud-client",
"solace.messaging.authentication.scheme.basic.password": "qaa53j6ih9l8ru646n1l7rjm64"}
messaging_service = service.MessagingServiceClientBuilder().from_properties(config=broker_props).build()
messaging_service.connect()
print("connected")
# publisher = service.PersistentMessagePublisherBuilder().from_properties(configuration=broker_props).build()
# message_properties = {'env': 'test', 'application': 'test', 'object': 'sales-order'}
# out_message = OutboundMessageBuilder().build(payload=message, additional_message_properties=message_properties,
# converter=None)
# publisher.publish(message=out_message, destination=Topic.of('test-service/message'))
# print(f"Message published to solace...")_
After running the code I get error:
2021-04-27 17:22:54,917 [ERROR] solace.messaging.core: [_solace_session.py:580] [[SERVICE: 0x23cefec66d0] - [APP ID: app_404dc464-c4d0-4bfd-81e9-4be48c078ac2]] SOLCLIENT_SUBCODE_FAILED_LOADING_TRUSTSTORE
2021-04-27 17:22:54,917 [ERROR] solace.messaging.core: [_solace_session.py:582] [[SERVICE: 0x23cefec66d0] - [APP ID: app_404dc464-c4d0-4bfd-81e9-4be48c078ac2]] SESSION CREATION UNSUCCESSFUL. Failed to load trust store.
What truststore do I need to load to connect to this service in solace cloud?
Can someone please point me towards proper documentation for Python. I am referring to the documentation here: https://www.solace.dev/ and it looks like its incomplete.