Solace Messaging API for Python.
Actively maintained. Last release 4 weeks ago. A safe choice.
pip install solace-pubsubplusThis package contains the Solace Messaging API for Python.
The Solace Messaging API for Python is developed and supported by the Solace Corporation.
The API provides access to Solace Messaging Service, supporting a variety of Message Exchange Patterns.
Installation
Install the API using pip: pip install solace-pubsubplus
Dependencies
Solace Messaging API for Python requires Python 3.6 or greater.
Documentation
An online reference for the API is available at docs.solace.com.
Introduction
There are four primary objects in the Solace Messaging API for Python that applications can use, which are as follows:
MessagingService
from solace.messaging.messaging_service import MessagingService
The starting point for all client-broker connections. MessagingService defines and controls the connection to the Solace Event Broker.
A MessagingService object is created by the MessagingServiceBuilder.
MessagePublisher
from solace.messaging.publisher.message_publisher import MessagePublisher
The abstract base class for a Message Publisher (MessagePublisher). Applications do not build MessagePublisher objects directly, rather an application will invoke a builder.
for one of two derived objects:
DirectMessagePublisher: Created by aDirectMessagePublisherBuilder.DirectMessagePublishersend messages that are not acknowledged and are not stored on the Solace Event Broker. This is the fastest delivery path because messages are never queued and therefore cannot be delivered to offlineMessageReceiverat a later time. Messages published byDirectMessagePublisherare eligible for discard when network congestion occurs.PersistentMessagePublisher: Created by aPersistentMessagePublisherBuilder.PersistentMessagePublishersends messages that are guaranteed to be delivered toMessageReceiver, even if theMessageReceiverobject is offline. Solace Event Broker stores the messages until they are delivered and consumed by all subscribing receivers.
MessageReceiver
from solace.messaging.receiver.message_receiver import MessageReceiver
The abstract base class for a Message Receiver (). Applications do not build objects directly, rather an application will invoke a builder for one of two derived objects: