Solace Python API.
Project description
This package contains the Solace PubSub+ Messaging API for Python.
The Solace PubSub+ Messaging API for Python is developed and supported by the Solace Corporation. This API generally follows the Builder pattern as adapted for Python. At the core of this API, the Solace PubSub+ Message API for C is used to provide network and transport services. It is not necessary to be knowledgeable in C or the Solace PubSub+ Messaging API for C to use this package.
Installation
Install the API using pip: pip install solace-pubsubplus
Dependencies
Solace PubSub+ Messaging API for Python requires Python 3.7 or greater.
Documentation
An online reference for the API is available at docs.solace.com.
Introduction
There are four primary objects in the PubSub+ 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 PubSub+ 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 PubSub+ 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.PeristentMessagePublisher: Created by aPeristentMessagePublisherBuilder.PersistentMessagePublishersends messages that are guaranteed to be delivered toMessageReceiver, even if theMessageReceiverobject is offline. PubSub+ 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 (Message Receiver). Applications do not build MessageReceiver objects directly, rather an application will invoke a builder for one of two derived objects:
DirectMessageReceiver: Created by aDirectMessageReceiverBuilder.DirectMessgeReceiverconsumes messages as they are published.DirectMessageReceiverwill not receive messages published before the receiver is created or while the receiver is offline.DirectMessageReceiveris not required to acknowledge received messages.DirectMessageReceivermay receive messages from any publisher (persistent or direct), but only while theDirectMessageReceiveris online.PersistentMessageReceiver: Created by aPersistentMessageReceiverBuilder.PersistentMessageReceiverconsume messages from a queue created on the Solace Pubsub+ Event broker. When the queue is created and subscriptions applied, it will begin storing messages, even ifPersistentMessageReceiveris offline. Messages are stored until delivered to thePersistentMessageReceiverand thePersistentMessageReceiveracknowledges the message.PersistentMessageReceiveris responsible for acknowledging messages received to remove them from the PubSub+ Event Broker Queue.
Message
from solace.messaging.core.message import Message
The abstract base class for a Message. Applications do not build a Message object directly, rather an application will invoke a builder for an OutboundMessage (for publish) or
receive an InboundMessage (from a MessageReceiver).
Samples
Sample applications are available at the Solace Developer Community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solace_pubsubplus-0.2.0-py36-none-any.whl.
File metadata
- Download URL: solace_pubsubplus-0.2.0-py36-none-any.whl
- Upload date:
- Size: 16.0 MB
- Tags: Python 3.6
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0da59d00eeeeeb4a2f96f2cbe0be18e065fa0dab70f673ada5caf367fede7832
|
|
| MD5 |
08ac3eb4e22c8a1bf4a58f3619c533d7
|
|
| BLAKE2b-256 |
efc998b4a30b7bc11de543af3dff5e16b466f3fb2259c0f13952597332c57173
|