solace.messaging.config package

solace.messaging.config.authentication_strategy module

This module contains the AuthenticationStrategy abstract base class and implementation classes for each available AuthenticationStrategy instance available.

class solace.messaging.config.authentication_strategy.AuthenticationConfiguration

Bases: ABC

An abstract base class that provides the with_authentication_strategy() interface for the solace.messaging.message_service.MessagingServiceClientBuilder.build() method.

abstract with_authentication_strategy(authentication_strategy: AuthenticationStrategy) AuthenticationConfiguration

Specifies the authentication strategy to configure.

Parameters:

authentication_strategy (AuthenticationStrategy) – The authentication strategy to use for connections to the PubSub+ event broker.

Returns:

The authentication configuration instance that can be used for method chaining.

Return type:

AuthenticationConfiguration

class solace.messaging.config.authentication_strategy.AuthenticationStrategy

Bases: ABC

An abstract base class for all authentication strategy classes that include:

abstract property authentication_configuration: dict

Retrieves the authentication strategy.

Returns:

A dictionary with the authentication configuration.

Return type:

dict

class solace.messaging.config.authentication_strategy.BasicUserNamePassword(username: str, password: str)

Bases: AuthenticationStrategy

A concrete class implementation of basic username and password for the authentication strategy.

property authentication_configuration: dict

The authentication strategy configuration.

Returns:

A dictionary with the authentication configuration.

Return type:

dict

static of(username: str, password: str) BasicUserNamePassword

Creates an instance of BasicUserNamePassword based on the specified from the username and password.

Parameters:
  • username (str) – The user name to use to create a BasicUserNamePassword object.

  • password (str) – The password to use to create a BasicUserNamePassword object.

Returns:

The created object.

Return type:

BasicUserNamePassword

class solace.messaging.config.authentication_strategy.ClientCertificateAuthentication(certificate_file: str, key_file: str, key_password: str)

Bases: AuthenticationStrategy

A concrete class implementation of client certificate authentication for the authentication strategy. Client certificate authentication can be used when the client connections to the PubSub+ event broker are TLS/SSL-encrypted.

For a client to use a client certificate authentication scheme, the PubSub+ event broker must be properly configured for TLS/SSL connections, and the verification of the client certificate must be enabled for the particular Message VPN that the client connects to.

property authentication_configuration: dict

The authentication strategy configuration.

static of(certificate_file: str, key_file: str, key_password: str) ClientCertificateAuthentication

Creates an instance of ClientCertificateAuthentication from the given client certificate configuration.

Parameters:
  • certificate_file (str) – The file that contains the client certificate or the client-certificate chain.

  • key_file (str) – The file contains the client private key.

  • key_password (str) – Password if the private key (key_file) is password protected.

Returns:

The instance of the object.

Return type:

ClientCertificateAuthentication

with_certificate_and_key_pem(certificate_pem_file: str) ClientCertificateAuthentication

Set the client certificate or the client-certificate chain, and the client private key from a single .PEM file.

Parameters:

certificate_pem_file (str) – The file that contains the client certificate or the client-certificate chain, and the client private key. Both must be PEM-encoded.

Returns:

The instance of the object.

Return type:

ClientCertificateAuthentication

with_private_key_password(private_key_password: str) ClientCertificateAuthentication

Sets the password needed to use the client-certificate key file.

Parameters:

private_key_password (str) – The password if the file is password-protected.

Returns:

The instance of the object.

Return type:

ClientCertificateAuthentication

with_user_name(username: str) ClientCertificateAuthentication

A method to set the client-username. The broker uses the Common Name in the X.509 certificate as the client-username for authorization. If the Allow API Provided Username (not recommended) feature is enabled on the Message VPN as described here, https://docs.solace.com/Configuring-and-Managing/Configuring-Client-Authentication.htm#Allow-API, then the client-username configured with this method is used for authorization. In all cases authentication is still done by verifying the X.509 certificate is valid and signed by a know authority.

Parameters:

username (str) – The username string to assign as the global username.

Returns:

The instance of the object with the username configured.

This object can be used for method chaining.

Return type:

ClientCertificateAuthentication

class solace.messaging.config.authentication_strategy.Kerberos

Bases: ABC

A concrete class implementation of Kerberos Authentication for the authentication strategy. Kerberos is a protocol for authentication between nodes in a computer network over non-secure lines. This protocol relies on a combination of private key encryption and access tickets to safely verify user identities.

To implement Kerberos authentication for clients connecting to a Solace PubSub+ event broker, the following configurations are required on an event broker:

  • A Kerberos Keytab must be loaded on the event broker. See Event Broker File Management.

  • Kerberos authentication must be configured and enabled for any Message VPNs that Kerberos-authenticated clients will connect to.

  • Optional: On an appliance, a Kerberos Service Principal Name (SPN) can be assigned to the IP address for the message backbone VRF Kerberos‑authenticated clients will use.

Further reference can be found at

https://docs.solace.com/Configuring-and-Managing/Configuring-Client-Authentication.htm#Config-Kerberos

static default()
Returns:

The instance of the object with a default Kerberos service.

Return type:

Kerberos

static of(service_name: str)

Creates an instance of Kerberos from the given client Kerberos service name configuration.

Parameters:

service_name – A Valid Kerberos service name

Returns:

The instance of the object.

Return type:

Kerberos

abstract with_user_name(username: str) Kerberos

A method to set the client-username. The broker uses the Kerberos Principal as the client-username for authorization. If the Allow API Provided Username (not recommended) feature is enabled on the Message VPN as described here, https://docs.solace.com/Configuring-and-Managing/Configuring-Client-Authentication.htm#Allow-API-Username, then the client-username configured with this method is used for authorization. In all cases, authentication is still done by verifying the kerberos token.

Parameters:

username (str) – The username string to assign as the global username.

Returns:

The instance of the object with the username configured. This object can be used for method chaining.

Return type:

Kerberos

class solace.messaging.config.authentication_strategy.OAuth2(oidc_id_token: str | None = None, access_token: str | None = None, issuer_identifier: str | None = None)

Bases: AuthenticationStrategy

An implementation of OAuth 2.0 with access token and/or ID token authentication.

property authentication_configuration: dict

The authentication configuration.

static of(access_token: str, oidc_id_token: str, issuer_identifier: str | None = None) OAuth2

Creates an instance of OAuth2 based on the specified access token, and/or the specified OIDC token, and/or the specified issuer identifier. The issuer identifier is optional, but at least one of either an OIDC ID token or an access token must be provided.

Parameters:
  • oidc_id_token (str) – The OIDC ID token to be used for OAuth2 authentication. To not use an OIDC ID token for OAuth2 authentication, pass None as the value of this parameter.

  • access_token (str) – The access token to be used for OAuth2 authentication. To not use an access token for OAuth2 authentication, pass None as the value of this parameter.

  • issuer_identifier (str) – The issuer identifier.

Raises:

IllegalArgumentError – If both tokens are None; or, if one or more of the arguments are an empty string; or, if one or more of the arguments is not a string.

Returns:

The created object.

Return type:

Oauth2

with_issuer_identifier(issuer_identifier: str) OAuth2

Sets the optional issuer identifier.

Parameters:

issuer_identifier (str) – The issuer identifier.

Raises:

IllegalArgumentError(Exception) – If the issuer identifier is None, is an empty string, or is not a string.

Returns:

The instance of the object.

Return type:

OAuth2

solace.messaging.config.direct_receiver_back_pressure_configuration module

Module to handle back pressure configuration in solace.messaging.builder.direct_message_receiver_builder.DirectMessageReceiverBuilder.

class solace.messaging.config.direct_receiver_back_pressure_configuration.DirectReceiverBackPressureConfiguration

Bases: ABC

A class that abstracts configuration of back-pressure features All methods in this class are mutually exclusive and therefore should be called only once.

The default back-pressure configuration is to internally handle back pressure. This is equivalent to on_back_pressure_elastic().

abstract on_back_pressure_drop_latest(buffer_capacity: int) DirectReceiverBackPressureConfiguration

Configures the publisher with capacity-bounded, buffered back-pressure. If the buffer is full and is still receiving messages, the incoming message will be discarded. The maximum capacity of the buffer is given by the parameter of this method, buffer_capacity.

Parameters:

buffer_capacity (int) – The maximum number of messages to buffer before discarding the latest incoming message.

Returns:

An instance of itself for method chaining.

Return type:

DirectReceiverBackPressureConfiguration

Raises:
  • IllegalArgumentError – If an invalid buffer capacity is passed to this method. Valid buffer capacity is 0 or greater.

  • InvalidDataTypeError – If a buffer capacity of invalid type is passed to this method. Valid buffer capacity type is int.

abstract on_back_pressure_drop_oldest(buffer_capacity: int) DirectReceiverBackPressureConfiguration

Configures the publisher with capacity-bounded, buffered back-pressure. If the buffer is full and is still receiving messages, the oldest message in the buffer is discarded. The maximum capacity of the buffer is given by the parameter of this method, buffer_capacity.

Parameters:

buffer_capacity (int) – The maximum number of messages to buffer before discarding the oldest message.

Returns:

An instance of itself for method chaining.

Return type:

DirectReceiverBackPressureConfiguration

Raises:
  • PubSubPlusClientError – If an invalid buffer capacity is passed to this method. Valid buffer capacity is 0 or greater.

  • InvalidDataTypeError – If a buffer capacity of invalid type is passed to this method. Valid buffer capacity type is int.

abstract on_back_pressure_elastic() DirectReceiverBackPressureConfiguration

Configures the receiver to buffer indefinitely, consuming as much memory as required for buffered messages. On memory exhaustion receiver behaviour is undefined. Elastic, essentially no, back-pressure is an ideal strategy for applications that process received messages at a low rate with infrequent small bursts of activity. It should not be considered for use in all cases.

Returns:

An instance of itself for method chaining.

Return type:

DirectReceiverBackPressureConfiguration

Raises:

PubSubPlusClientError – When unable to configure the receiver.

solace.messaging.config.message_acknowledgement_configuration module

This module defines the interface for configuring message acknowledgement strategy. In some scenarios, when a specific message is published, the receiver that has received that message can send an acknowledgement for the message that was received back to the publisher. With auto-acknowledgement, you can automatically acknowledge each message. With client-acknowledgement, the user-defined application must deliberately acknowledge messages.

class solace.messaging.config.message_acknowledgement_configuration.MessageAcknowledgementConfiguration

Bases: MessageAutoAcknowledgementConfiguration

An abstract class that defines the interface to configure message acknowledgement strategy.

The default strategy enables client-acknowledgement and disables auto-acknowledgement.

abstract with_message_auto_acknowledgement() MessageAutoAcknowledgementConfiguration

Enables support for message auto acknowledgement (auto-ack) on all receiver methods, which includes both synchronous and asynchronous methods.

Note

  • For callback-based methods, auto-ack is performed when the message-processing callback method is finished without an error. This means that if the message-processing callback method processes a message using another thread, the message acknowledgement may be performed before that other thread finishes and any errors raised in the other thread are not considered.

  • For blocking receive (without callback) methods: auto-ack is performed immediately after the PersistentMessageReceiver.receive_message call returns.

  • Should the underlying network connectivity fail auto acknowledgement may fail after the message-processing callback method. In this case it is not guaranteed to acknowledge messages automatically.

Returns:

An instance of itself for method chaining.

abstract with_message_client_acknowledgement() MessageAcknowledgementConfiguration

Enables support for message client-acknowledgement (client-ack) on all receiver methods, which includes both synchronous and asynchronous methods. Client-acknowledgement must be executed by the user-defined application. It is recommended that client-acknowledgement be written in the on_message method of the user defined message handler. This message handler would be of type solace.messaging.receiver.message_receiver.MessageHandler.

Returns:

An instance of itself for method chaining.

solace.messaging.config.message_auto_acknowledgement_configuration module

This module defines the interface to enable message auto-acknowledgement. In some scenarios, when a specific message is published, the receiver that has received that message and send an acknowledgement for the message that was received back to the publisher. With auto-acknowledgement, you can automatically acknowledge each message.

class solace.messaging.config.message_auto_acknowledgement_configuration.MessageAutoAcknowledgementConfiguration

Bases: ABC

NOTE: THIS CLASS IS BEING ONLY FOR BACKWARDS-COMPATIBILITY, AND HAS BEEN DEPRECATED IN FAVOR OF solace.messaging.config.message_acknowledgement_configuration.MessageAcknowledgementConfiguration.

An abstract class that defines the interface to enable message auto-acknowledgement.

Auto-acknowledgement is disabled by default.

abstract with_message_auto_acknowledgement() MessageAutoAcknowledgementConfiguration

Enables support for message auto acknowledgement (auto-ack) on all receiver methods, which includes both synchronous and asynchronous methods.

Note

  • For callback-based methods, auto-ack is performed when the message-processing callback method is finished without an error. This means that if the message-processing callback method processes a message using another thread, the message acknowledgement may be performed before that other thread finishes and any errors raised in the other thread are not considered.

  • For blocking receive (without callback) methods: auto-ack is performed immediately after the PersistentMessageReceiver.receive_message call returns.

  • Should the underlying network connectivity fail auto acknowledgement may fail after the message-processing callback method. In this case it is not guaranteed to acknowledge messages automatically.

Returns:

An instance of itself for method chaining.

solace.messaging.config.message_replay_configuration module

This module defines the interface to enable message replay strategy. Message Replay is a feature of persistent messages receivers. When a persistent message receiver starts, it may choose to replay messages from the broker replay log, which will be received first before live messages.

class solace.messaging.config.message_replay_configuration.MessageReplayConfiguration

Bases: ABC

An abstract class that defines the interface to configure message message replay strategy in a persistent message receiver builder.

abstract with_message_replay(replay_strategy: ReplayStrategy) MessageReplayConfiguration

ADd a message replay message strategy to a persistent receiver.

Parameters:

replay_strategy (ReplayStrategy) – Specify the message replay strategy.

Returns:

A reference to self for method chaining.

Return type:

MessageReplayConfiguration

solace.messaging.config.missing_resources_creation_configuration module

This module defines the interface for MissingResourceCreationStrategy. When the client attempts to create a MessageReceiver or MessagePublisher but the necessary resources are not configured on the event broker, such as a Queue, then the MissingResourceCreationStrategy` defines what remedial action the API may take.

class solace.messaging.config.missing_resources_creation_configuration.MissingResourcesCreationConfiguration

Bases: ABC

An interface for classes that support a missing resource creation strategy. Classes that inherit this interface may be configured with a strategy.

If not set, the default is to not create missing resources.

abstract with_missing_resources_creation_strategy(strategy: MissingResourcesCreationStrategy) MissingResourcesCreationConfiguration

Adds the missing creation strategy that defines what remedial action the API may take.

Parameters:

strategy (MissingResourcesCreationStrategy) – Specify the missing creation strategy.

Returns:

A reference to the creation strategy for method chaining.

Return type:

MissingResourcesCreationConfiguration

class solace.messaging.config.missing_resources_creation_configuration.MissingResourcesCreationStrategy(value)

Bases: Enum

A class that represents the available missing resources creation strategies.

CREATE_ON_START = 1
DO_NOT_CREATE = 0

solace.messaging.config.property_based_configuration module

Module for property based configuration

class solace.messaging.config.property_based_configuration.PropertyBasedConfiguration

Bases: ABC

An abstract class that abstracts extended property-based configuration for fine-tuning.

abstract from_properties(configuration: dict) PropertyBasedConfiguration

Enables a dictionary based on the configuration.

Parameters:

configuration (dict) – The dictionary containing the properties.

Raises:

IllegalArgumentError – When invalid properties are added.

solace.messaging.config.publisher_back_pressure_configuration module

Module to handle back pressure configuration in solace.messaging.builder.message_publisher_builder.MessagePublisherBuilder.

class solace.messaging.config.publisher_back_pressure_configuration.PublisherBackPressureConfiguration

Bases: ABC

A class that abstracts configuration of back-pressure features All methods in this class are mutually exclusive and therefore should be called only once.

The default back-pressure configuration is to internally handle back pressure. This is equivalent on_back_pressure_elastic().

abstract on_back_pressure_elastic() PublisherBackPressureConfiguration

Configures the publisher to buffer indefinitely, consuming as much memory as required for buffered messages. On memory exhaustion publisher behavior is undefined. Elastic, essential no, back-pressure is an ideal strategy for applications that publish messages at a low rate with infrequent small bursts of activity. It should not be considered for use in all cases.

Returns:

An instance of itself for method chaining.

Raises:

PubSubPlusClientError – When unable to configure the publisher.

abstract on_back_pressure_reject(buffer_capacity: int) PublisherBackPressureConfiguration

Configures the publisher with capacity-bounded, buffered back-pressure; when the application keeps publishing, the publish method raises a solace.messaging.errors.pubsubplus_client_error.PublisherOverflowError if the specified buffer_capacity is exceeded. If the capacity is 0 an exception is thrown when the transport is full. And there is no internal buffer capacity.

Parameters:

buffer_capacity (int) – The maximum number of messages to buffer before raising an exception.

Returns:

An instance of itself for method chaining.

Raises:
abstract on_back_pressure_wait(buffer_capacity: int) PublisherBackPressureConfiguration

Configures the publisher with capacity bounded buffered back-pressure. If the application application keeps publishing using the publish() method, it blocks and waits for room if the specified buffer_capacity has been exceeded.

Parameters:

buffer_capacity (int) – The maximum number of messages to buffer before raising an error.

Returns:

An instance of itself for method chaining.

Raises:

solace.messaging.config.receiver_activation_passivation_configuration module

Module contains the abstract classes for ReceiverActivationPassivationConfiguration and ReceiverStateChangeListener and ReceiverState

class solace.messaging.config.receiver_activation_passivation_configuration.ReceiverActivationPassivationConfiguration

Bases: ABC

Abstract class that defines the interface to support for activation/passivation notifications send from a PubSub+ event broker to the particular instance of the receiver.

abstract with_activation_passivation_support(receiver_state_change_listener: ReceiverStateChangeListener) ReceiverActivationPassivationConfiguration

Enables the receiver to receive event broker notifications about state changes of the specified receiver instance.

Parameters:

receiver_state_change_listener (ReceiverStateChangeListener) – The receiver instance to receive state changes about.

class solace.messaging.config.receiver_activation_passivation_configuration.ReceiverState(value)

Bases: Enum

The receiver states.

ACTIVE = 5
PASSIVE = 6
class solace.messaging.config.receiver_activation_passivation_configuration.ReceiverStateChangeListener

Bases: object

A class that abstracts notifications processing about activation/passivation of the consumer receiver.

on_change(old_state: ReceiverState, new_state: ReceiverState, change_time_stamp: float)

Changes the receiver state.

Parameters:
  • old_state (ReceiverState) – The old state to change from, which can be ACTIVE or PASSIVE.

  • new_state (ReceiverState) – The new state to change to, which can be ACTIVE or PASSIVE.

  • change_time_stamp (float) – The timestamp to use for the change.

solace.messaging.config.replay_strategy module

This module contains abstract base class for strategies for replay and its concrete implementations.

The ReplayStrategy instance is configured in the PersistentMessageReceiver with the PersistentMessageReceiverBuilder.with_message_replay() method.

The following implementations of ReplayStrategy exist:

class solace.messaging.config.replay_strategy.AllMessagesReplay

Bases: ReplayStrategy

Replay strategy to replay all messages in the replay log.

static all_messages() AllMessagesReplay

Factory method to create replay strategy for ALL available messages

Returns:

A new instance of the class

AllMessagesReplay.

static replication_group_message_id_based(replication_group_message_id: ReplicationGroupMessageId) ReplicationGroupMessageIdReplay

Factory method to create a replay strategy based on Replication Group Message ID.

There are two ways to acquire ReplicationGroupMessageId for this method:

Parameters:

replication_group_message_id (ReplicationGroupMessageId) – Replication Group Message ID. If found, all messages after the Replication Group Message ID are replayed.

Returns:

A new instance of ReplicationGroupMessageIdReplay

static time_based(replay_date: datetime) TimeBasedReplay

Factory method to create time based replay strategy based on start time and timezone

An example building the TimeBasedReplay strategy using a datetime object:

datetime_object = datetime.datetime.now(datetime.timezone.utc)
new_time_based_replay_strategy_obj = ReplayStrategy.time_based(datetime_object)
Parameters:

replay_date (datetime.datetime) – the date and time from which messages will be replayed. The replay_date should be a timezone aware datetime object. If the passed datetime object is naive, the API will assume it represents the system’s local time zone.

Returns:

A new instance of TimeBasedReplay.

class solace.messaging.config.replay_strategy.ReplayStrategy

Bases: ABC

This class represents the message replay strategy. Message replay lets applications retrieve information long after it was sent and delivered. The replay strategies available are:

Static factory methods are provide to instantiate each of the above ReplayStrategy.

static all_messages() AllMessagesReplay

Factory method to create replay strategy for ALL available messages

Returns:

A new instance of the class

AllMessagesReplay.

static replication_group_message_id_based(replication_group_message_id: ReplicationGroupMessageId) ReplicationGroupMessageIdReplay

Factory method to create a replay strategy based on Replication Group Message ID.

There are two ways to acquire ReplicationGroupMessageId for this method:

Parameters:

replication_group_message_id (ReplicationGroupMessageId) – Replication Group Message ID. If found, all messages after the Replication Group Message ID are replayed.

Returns:

A new instance of ReplicationGroupMessageIdReplay

static time_based(replay_date: datetime) TimeBasedReplay

Factory method to create time based replay strategy based on start time and timezone

An example building the TimeBasedReplay strategy using a datetime object:

datetime_object = datetime.datetime.now(datetime.timezone.utc)
new_time_based_replay_strategy_obj = ReplayStrategy.time_based(datetime_object)
Parameters:

replay_date (datetime.datetime) – the date and time from which messages will be replayed. The replay_date should be a timezone aware datetime object. If the passed datetime object is naive, the API will assume it represents the system’s local time zone.

Returns:

A new instance of TimeBasedReplay.

class solace.messaging.config.replay_strategy.ReplicationGroupMessageIdReplay(replay_id: ReplicationGroupMessageId)

Bases: ReplayStrategy

Replay strategy to replay all messages after a given Replication Group Message Id.

static all_messages() AllMessagesReplay

Factory method to create replay strategy for ALL available messages

Returns:

A new instance of the class

AllMessagesReplay.

property replication_group_message_id

Replication Group Message Id

static replication_group_message_id_based(replication_group_message_id: ReplicationGroupMessageId) ReplicationGroupMessageIdReplay

Factory method to create a replay strategy based on Replication Group Message ID.

There are two ways to acquire ReplicationGroupMessageId for this method:

Parameters:

replication_group_message_id (ReplicationGroupMessageId) – Replication Group Message ID. If found, all messages after the Replication Group Message ID are replayed.

Returns:

A new instance of ReplicationGroupMessageIdReplay

static time_based(replay_date: datetime) TimeBasedReplay

Factory method to create time based replay strategy based on start time and timezone

An example building the TimeBasedReplay strategy using a datetime object:

datetime_object = datetime.datetime.now(datetime.timezone.utc)
new_time_based_replay_strategy_obj = ReplayStrategy.time_based(datetime_object)
Parameters:

replay_date (datetime.datetime) – the date and time from which messages will be replayed. The replay_date should be a timezone aware datetime object. If the passed datetime object is naive, the API will assume it represents the system’s local time zone.

Returns:

A new instance of TimeBasedReplay.

class solace.messaging.config.replay_strategy.TimeBasedReplay(replay_date: datetime)

Bases: ReplayStrategy

Replay strategy to replay all messages from a given time.

static all_messages() AllMessagesReplay

Factory method to create replay strategy for ALL available messages

Returns:

A new instance of the class

AllMessagesReplay.

get_replay_date() datetime
Returns:

The date used to construct this

TimeBasedReplay object.

static replication_group_message_id_based(replication_group_message_id: ReplicationGroupMessageId) ReplicationGroupMessageIdReplay

Factory method to create a replay strategy based on Replication Group Message ID.

There are two ways to acquire ReplicationGroupMessageId for this method:

Parameters:

replication_group_message_id (ReplicationGroupMessageId) – Replication Group Message ID. If found, all messages after the Replication Group Message ID are replayed.

Returns:

A new instance of ReplicationGroupMessageIdReplay

static time_based(replay_date: datetime) TimeBasedReplay

Factory method to create time based replay strategy based on start time and timezone

An example building the TimeBasedReplay strategy using a datetime object:

datetime_object = datetime.datetime.now(datetime.timezone.utc)
new_time_based_replay_strategy_obj = ReplayStrategy.time_based(datetime_object)
Parameters:

replay_date (datetime.datetime) – the date and time from which messages will be replayed. The replay_date should be a timezone aware datetime object. If the passed datetime object is naive, the API will assume it represents the system’s local time zone.

Returns:

A new instance of TimeBasedReplay.

solace.messaging.config.retry_strategy module

This module that contains the interface definition for the retry strategy.

The RetryStrategy instance is configured in the MessagingService with the MessagingServiceClientBuilder.with_connection_retry_strategy() method.

class solace.messaging.config.retry_strategy.RetryStrategy

Bases: ABC

This is an abstract base class that provides static methods for generating specific retry strategies.

The default retry strategy retries 3 times at an interval of 3 seconds.

static forever_retry(retry_interval: int | None = None) RetryStrategy

Creates an instance for automatic retries with a given retry interval. When created with forever_retry(), the configuration will never terminate its retry attempts.

Parameters:

retry_interval (int) – The retry interval in milliseconds. The valid range for retry interval is 0 - 60000.

Returns:

An instance of the retry strategy to configure automatic retry without termination.

Return type:

RetryStrategy

static never_retry() RetryStrategy

Creates an instance for a retry strategy that does not perform any retry attempts.

When created with never_retry(), the configuration will never retry a connection attempt or attempt a reconnection at all.

Returns:

An object to configure that no retries are to be made.

Return type:

RetryStrategy

static parametrized_retry(retries: int, retry_interval: int) RetryStrategy

Creates an instance with retry properties defined by the parameters.

Parameters:
  • retries (int) – The maximum number of retry attempts. The minimum value for the reconnect retries is -1, The recommended reconnect retries value is 3.

  • retry_interval (int) – The time (in milliseconds) to wait between retries.

Returns:

An object to configure the retry strategy.

Return type:

RetryStrategy

solace.messaging.config.sub_code module

class solace.messaging.config.sub_code.SolClientSubCode(value)

Bases: Enum

SolClient sub code enums from underlying protocol engine for additional error information

SOLCLIENT_SUBCODE_ASSURED_MESSAGING_NOT_ESTABLISHED = 34

A send call was made to send a Guaranteed message before Guaranteed Delivery is established (Deprecated).

SOLCLIENT_SUBCODE_ASSURED_MESSAGING_STATE_ERROR = 35

An attempt was made to start Guaranteed Delivery when it is already started.

SOLCLIENT_SUBCODE_BASIC_AUTHENTICATION_IS_SHUTDOWN = 103

The client attempted to connect to an appliance that has the basic authentication shutdown.

SOLCLIENT_SUBCODE_BROWSING_NOT_SUPPORTED_ON_PARTITIONED_QUEUE = 159

The client attempted to use a browser flow on a partitioned queue.

SOLCLIENT_SUBCODE_CACHE_ALREADY_IN_PROGRESS = 57

A cache request has been made when there is already a cache request outstanding on the same Topic and SOLCLIENT_CACHEREQUEST_FLAGS_LIVEDATA_FLOWTHRU was not set.

SOLCLIENT_SUBCODE_CACHE_ERROR_RESPONSE = 53

The cache instance has returned an error response to the request.

SOLCLIENT_SUBCODE_CACHE_INVALID_SESSION = 54

The cache session operation failed because the Session has been destroyed.

SOLCLIENT_SUBCODE_CACHE_LIVEDATA_FULFILL = 56

The cache session operation completed when live data arrived on the Topic requested.

SOLCLIENT_SUBCODE_CACHE_NO_DATA = 51

When the cache request returns SOLCLIENT_INCOMPLETE, this subcode indicates there is no cached data in the designated cache.

SOLCLIENT_SUBCODE_CACHE_REQUEST_CANCELLED = 107

The cache request has been cancelled by the client.

SOLCLIENT_SUBCODE_CACHE_SUSPECT_DATA = 52

When the designated cache responds to a cache request with suspect data the API returns SOLCLIENT_INCOMPLETE with this subcode.

SOLCLIENT_SUBCODE_CACHE_TIMEOUT = 55

The cache session operation failed because the request timeout expired.

SOLCLIENT_SUBCODE_CANNOT_BIND_TO_QUEUE = 59

Already bound to the queue, or not authorized to bind to the queue.

SOLCLIENT_SUBCODE_CANNOT_BLOCK_IN_CONTEXT = 87

An API function was invoked in the Context thread that would have blocked otherwise. For an example, a call may have been made to send a message when the Session is configured with SOLCLIENT_SESSION_PROP_SEND_BLOCKING enabled and the transport (socket or IPC) channel is full. All application callback functions are executed in the Context thread.

SOLCLIENT_SUBCODE_CANNOT_MODIFY_WHILE_NOT_IDLE = 44

An attempt was made to modify a property that cannot be modified while Session is not idle.

SOLCLIENT_SUBCODE_CERTIFICATE_DATE_INVALID = 101

The client attempted to connect to an appliance that does not have a valid certificate date.

SOLCLIENT_SUBCODE_CLIENT_ACL_DENIED = 67

The client login to the appliance was denied because the IP address/netmask combination used for the client is designated in the ACL (Access Control List) as a deny connection for the given Message VPN and username.

SOLCLIENT_SUBCODE_CLIENT_CERTIFICATE_AUTHENTICATION_IS_SHUTDOWN = 104

The client attempted to connect to an appliance that has the client certificate authentication shutdown.

SOLCLIENT_SUBCODE_CLIENT_CERTIFICATE_DATE_INVALID = 106

The client failed to connect to an appliance as it does not have a valid client certificate date.

SOLCLIENT_SUBCODE_CLIENT_DELETE_IN_PROGRESS = 21

The client login not currently possible as previous instance of same client still being deleted.

SOLCLIENT_SUBCODE_CLIENT_INITIATED_REPLAY_BROWSER_FLOW_NOT_ALLOWED = 137

The client attempted to bind with both SOLCLIENT_FLOW_PROP_BROWSER enabled and SOLCLIENT_FLOW_PROP_REPLAY_START_LOCATION set.

SOLCLIENT_SUBCODE_CLIENT_INITIATED_REPLAY_INACTIVE_FLOW_NOT_ALLOWED = 136

The client attempted to start replay on an inactive flow.

SOLCLIENT_SUBCODE_CLIENT_INITIATED_REPLAY_NON_EXCLUSIVE_NOT_ALLOWED = 135

The client attempted to start replay on a flow bound to a non-exclusive endpoint.

SOLCLIENT_SUBCODE_CLIENT_NAME_ALREADY_IN_USE = 50

The Session is attempting to use a client, publisher name, or subscriber name that is in use by another client, publisher, or subscriber, and the appliance is configured to reject the new Session. When Message VPNs are in use, the conflicting client name must be in the same Message VPN.

SOLCLIENT_SUBCODE_CLIENT_NAME_INVALID = 46

The client name chosen has been rejected as invalid by the appliance.

SOLCLIENT_SUBCODE_CLIENT_USERNAME_IS_SHUTDOWN = 48

The username for the client is administratively shutdown on the appliance.

SOLCLIENT_SUBCODE_COMMIT_OR_ROLLBACK_IN_PROGRESS = 124

The client attempted to send/receive a message or commit/rollback a transaction when a transaction commit/rollback is in progress.

SOLCLIENT_SUBCODE_COMMIT_STATUS_UNKNOWN = 127

The commit response was lost due to a transport layer reconnection to an alternate host in the host list.

SOLCLIENT_SUBCODE_COMMUNICATION_ERROR = 14

An API call failed due to a communication error. An error string can be retrieved with solClient_getLastErrorInfo().

SOLCLIENT_SUBCODE_COMPRESSED_SSL_NOT_SUPPORTED = 150

The client attempted to establish a Session or Flow with ssl and compression, but the capability is not supported by the appliance.

SOLCLIENT_SUBCODE_CONTAINER_BUSY = 42

An attempt was made to add a field to a map or stream while a sub map or stream is being built.

SOLCLIENT_SUBCODE_CONTROL_OTHER = 27

The appliance rejected a control message for another reason not separately enumerated.

SOLCLIENT_SUBCODE_CUT_THROUGH_ALREADY_BOUND = 91

An attempt was made to create a ‘cut-through’ Flow on a Session that already has one ‘cut-through’ Flow

SOLCLIENT_SUBCODE_CUT_THROUGH_INCOMPATIBLE_WITH_SESSION = 92

An attempt was made to create a ‘cut-through’ Flow on a Session with incompatible Session properties. Cut-through may not be enabled on Sessions with SOLCLIENT_SESSION_PROP_TOPIC_DISPATCH enabled.

SOLCLIENT_SUBCODE_CUT_THROUGH_UNSUPPORTED = 90

An attempt was made to create a ‘cut-through’ Flow on a Session that does not support this capability

SOLCLIENT_SUBCODE_DATA_OTHER = 28

The appliance rejected a data message for another reason not separately enumerated.

SOLCLIENT_SUBCODE_DBLOCK_ALREADY_EXISTS = 40

An attempt was made to allocate a datablock for a msg element when one already exists.

SOLCLIENT_SUBCODE_DELIVERY_COUNT_NOT_SUPPORTED = 155

The message was received from endpoint that does not support delivery count

SOLCLIENT_SUBCODE_DELIVERY_MODE_UNSUPPORTED = 108

Attempt was made from a Transacted Session to send a message with the delivery mode SOLCLIENT_DELIVERY_MODE_DIRECT.

SOLCLIENT_SUBCODE_DELIVER_TO_ONE_INVALID = 70

An attempt was made to set both Deliver-To-One (DTO) and Guaranteed Delivery in the same message. (Deprecated:DTO will be applied to the corresponding demoted direct message)

SOLCLIENT_SUBCODE_DYNAMIC_CLIENTS_NOT_ALLOWED = 49

The username for the Session has not been set and dynamic clients are not allowed.

SOLCLIENT_SUBCODE_ENDPOINT_ALREADY_EXISTS = 75

An attempt was made to create a Queue or Topic Endpoint that already exists. This subcode is only returned if the provision flag SOLCLIENT_PROVISION_FLAGS_IGNORE_EXIST_ERRORS is not set.

SOLCLIENT_SUBCODE_ENDPOINT_MODIFIED = 121

The client attempted to commit a transaction with an Endpoint being shutdown or deleted.

SOLCLIENT_SUBCODE_ENDPOINT_PROPERTY_MISMATCH = 79

An attempt was made to create a dynamic durable endpoint and it was found to exist with different properties.

SOLCLIENT_SUBCODE_FAILED_LOADING_CERTIFICATE_AND_KEY = 102

The client failed to load certificate and/or private key files.

SOLCLIENT_SUBCODE_FAILED_LOADING_TRUSTSTORE = 98

The client failed to load the trust store.

SOLCLIENT_SUBCODE_FLOW_ACTIVE_FLOW_INDICATION_UNSUPPORTED = 88

The client attempted to establish a Flow with Active Flow Indication (SOLCLIENT_FLOW_PROP_ACTIVE_FLOW_IND) enabled and the capability is not supported by the appliance

SOLCLIENT_SUBCODE_FLOW_UNBOUND = 110

The client attempted to receive message from an UNBOUND Flow with no queued messages in memory.

SOLCLIENT_SUBCODE_INIT_NOT_CALLED = 9

An API call failed due to solClient_initialize() not being called first.

SOLCLIENT_SUBCODE_INSUFFICIENT_SPACE = 4

An API call failed due to insufficient space to accept more data.

SOLCLIENT_SUBCODE_INTERNAL_ERROR = 6

An API call had an internal error (not an application fault).

SOLCLIENT_SUBCODE_INVALID_CONNECTION_OWNER = 122

The client attempted to commit a transaction with an unknown connection ID.

SOLCLIENT_SUBCODE_INVALID_DATA_CONVERSION = 43

An attempt was made to retrieve structured data with wrong type.

SOLCLIENT_SUBCODE_INVALID_FLOW_OPERATION = 93

An API call failed due to the attempted operation not being valid for the Flow.

SOLCLIENT_SUBCODE_INVALID_SELECTOR = 77

An attempt was made to bind to a Queue or Topic Endpoint with an invalid selector.

SOLCLIENT_SUBCODE_INVALID_SESSION_OPERATION = 32

An API call failed due to the attempted operation not being valid for the Session.

SOLCLIENT_SUBCODE_INVALID_SMF_MESSAGE = 84

The client attempted to send a Solace Message Format (SMF) message using solClient_session_sendSmf() or solClient_session_sendMultipleSmf(), but the buffer did not contain a Direct message.

SOLCLIENT_SUBCODE_INVALID_TOPIC_NAME_FOR_DTE = 60

Deprecated name; SOLCLIENT_SUBCODE_INVALID_TOPIC_NAME_FOR_TE is preferred.

SOLCLIENT_SUBCODE_INVALID_TOPIC_NAME_FOR_TE = 60

An attempt was made to bind to a Topic Endpoint with an invalid topic.

SOLCLIENT_SUBCODE_INVALID_TOPIC_SYNTAX = 17

An attempt was made to use a Topic that has a syntax which is not supported.

SOLCLIENT_SUBCODE_INVALID_TRANSACTED_SESSION_ID = 111

The client attempted to commit or rollback a transaction with an invalid Transacted Session Id.

SOLCLIENT_SUBCODE_INVALID_TRANSACTION_ID = 112

The client attempted to commit or rollback a transaction with an invalid transaction Id.

SOLCLIENT_SUBCODE_INVALID_VIRTUAL_ADDRESS = 20

An attempt was made to connect to the wrong IP address on the appliance (must use CVRID if configured) or the appliance CVRID has changed and this was detected on reconnect.

SOLCLIENT_SUBCODE_KEEP_ALIVE_FAILURE = 11

The Session Keep-Alive detected a failed Session.

SOLCLIENT_SUBCODE_KERBEROS_AUTHENTICATION_IS_SHUTDOWN = 123

The client attempted to connect to an appliance that has the Kerberos authentication shutdown.

SOLCLIENT_SUBCODE_LIBRARY_NOT_LOADED = 97

The client failed to find the library or symbol.

SOLCLIENT_SUBCODE_LOGIN_FAILURE = 19

The client could not log into the appliance (bad username or password).

SOLCLIENT_SUBCODE_LOG_FILE_ERROR = 29

Could not open the log file name specified by the application for writing (Deprecated - SOLCLIENT_SUBCODE_OS_ERROR is used).

SOLCLIENT_SUBCODE_LOW_PRIORITY_MSG_CONGESTION = 96

The message was rejected by the appliance as one or more matching endpoints exceeded the reject-low-priority-msg-limit.

SOLCLIENT_SUBCODE_MAX_CLIENTS_FOR_DTE = 64

Deprecated name, SOLCLIENT_SUBCODE_MAX_CLIENTS_FOR_TE is preferred.

SOLCLIENT_SUBCODE_MAX_CLIENTS_FOR_QUEUE = 63

An attempt was made to bind to a Queue that already has a maximum number of clients.

SOLCLIENT_SUBCODE_MAX_CLIENTS_FOR_TE = 64

An attempt was made to bind to a Topic Endpoint that already has a maximum number of clients.

SOLCLIENT_SUBCODE_MAX_MESSAGE_USAGE_EXCEEDED = 78

Publishing of message denied because the maximum spooled message count was exceeded.

SOLCLIENT_SUBCODE_MAX_TOTAL_MSGSIZE_EXCEEDED = 39

An attempt was made to send a message with a total size greater than that supported by the protocol.

SOLCLIENT_SUBCODE_MAX_TRANSACTED_SESSIONS_EXCEEDED = 113

The client failed to open a Transacted Session as it exceeded the max Transacted Sessions.

SOLCLIENT_SUBCODE_MAX_TRANSACTIONS_EXCEEDED = 126

The client failed to open a Transacted Session as the maximum number of transactions was exceeded.

SOLCLIENT_SUBCODE_MESSAGE_CONSUME_FAILURE = 120

The client attempted to commit a transaction with a consume failure encountered.

SOLCLIENT_SUBCODE_MESSAGE_ID_NOT_COMPARABLE = 157

Replication Group Message Id are not comparable. Messages must be published to the same broker or HA pair for their Replicaton Group Message Id to be comparable.

SOLCLIENT_SUBCODE_MESSAGE_PUBLISH_FAILURE = 118

The client attempted to commit a transaction with a GD publish failure encountered.

SOLCLIENT_SUBCODE_MESSAGE_TOO_LARGE = 30

The client attempted to send a message larger than that supported by the appliance.

SOLCLIENT_SUBCODE_MISMATCHED_ENDPOINT_ERROR_ID = 146

Endpoint error ID in the bind request does not match the endpoint’s error ID.

SOLCLIENT_SUBCODE_MISSING_REPLY_TO = 58

A message does not have the required reply-to field.

SOLCLIENT_SUBCODE_MSG_VPN_NOT_ALLOWED = 45

The Message VPN name set for the Session is not allowed for the Session’s username.

SOLCLIENT_SUBCODE_MSG_VPN_UNAVAILABLE = 47

The Message VPN name set for the Session (or the default Message VPN, if none was set) is currently shutdown on the appliance.

SOLCLIENT_SUBCODE_NO_LOCAL_NOT_SUPPORTED = 85

The client attempted to establish a Session or Flow with No Local enabled and the capability is not supported by the appliance.

SOLCLIENT_SUBCODE_NO_MORE_NON_DURABLE_QUEUE_OR_TE = 74

An attempt was made to bind to a non-durable Queue or Topic Endpoint, and the appliance is out of resources.

SOLCLIENT_SUBCODE_NO_STRUCTURED_DATA = 41

An attempt was made to create a container to read structured data where none exists.

SOLCLIENT_SUBCODE_NO_SUBSCRIPTION_MATCH = 130

The client attempted to publish a guaranteed message to a topic that did not have any guaranteed subscription matches or only matched a replicated topic.

SOLCLIENT_SUBCODE_NO_TRANSACTION_STARTED = 116

The client attempted to commit an unknown transaction.

SOLCLIENT_SUBCODE_OBJECT_DESTROYED = 154

The operation cannot be completed because the object (context, session, flow) for the method has been destroyed in another thread.

SOLCLIENT_SUBCODE_OK = 0

No error.

SOLCLIENT_SUBCODE_OS_ERROR = 13

An API call failed due to a failed operating system call; an error string can be retrieved with solClient_getLastErrorInfo().

SOLCLIENT_SUBCODE_OUT_OF_MEMORY = 7

An API call failed due to inability to allocate memory.

SOLCLIENT_SUBCODE_OUT_OF_REPLAY_RESOURCES = 147

A replay was requested, but the router does not have sufficient resources to fulfill the request, due to too many active replays.

SOLCLIENT_SUBCODE_OUT_OF_RESOURCES = 5

An API call failed due to lack of resources (for example, starting a timer when all timers are in use).

SOLCLIENT_SUBCODE_PARAM_CONFLICT = 3

An API call was made with a parameter combination that is not valid.

SOLCLIENT_SUBCODE_PARAM_NULL_PTR = 2

An API call was made with a null or invalid pointer parameter.

SOLCLIENT_SUBCODE_PARAM_OUT_OF_RANGE = 1

An API call was made with an out-of-range parameter.

SOLCLIENT_SUBCODE_PERMISSION_NOT_ALLOWED = 76

An attempt was made to delete or create a Queue or Topic Endpoint when the Session does not have authorization for the action. This subcode is also returned when an attempt is made to remove a message from an endpoint when the Session does not have ‘consume’ authorization, or when an attempt is made to add or remove a Topic subscription from a Queue when the Session does not have ‘modify-topic’ authorization.

SOLCLIENT_SUBCODE_PROTOCOL_ERROR = 8

An API call failed due to a protocol error with the appliance (not an application fault).

SOLCLIENT_SUBCODE_PROXY_AUTH_FAILURE = 129

The host entry contained invalid proxy authentication when required by the proxy server.

SOLCLIENT_SUBCODE_PROXY_AUTH_REQUIRED = 128

The host entry did not contain proxy authentication when required by the proxy server.

SOLCLIENT_SUBCODE_PUBLISHER_NOT_CREATED = 109

Client attempted to send a message from a Transacted Session without creating a default publisher flow.

SOLCLIENT_SUBCODE_PUBLISHER_NOT_ESTABLISHED = 117

A send call was made on a transacted session before its publisher is established.

SOLCLIENT_SUBCODE_PUBLISH_ACL_DENIED = 69

A message could not be published because its Topic matched a Topic defined on the ACL (Access Control List).

SOLCLIENT_SUBCODE_QUEUENAME_INVALID_MODE = 38

An attempt was made to use a Queue name on a non-Guaranteed message.

SOLCLIENT_SUBCODE_QUEUENAME_TOO_LARGE = 37

An attempt was made to use a Queue name which is longer than the maximum supported length.

SOLCLIENT_SUBCODE_QUEUENAME_TOPIC_CONFLICT = 36

Both Queue Name and Topic are specified in solClient_session_send.

SOLCLIENT_SUBCODE_QUEUE_NOT_FOUND = 66

The specified Queue was not found when publishing a message.

SOLCLIENT_SUBCODE_QUEUE_SHUTDOWN = 72

An attempt was made to operate on a shutdown queue.

SOLCLIENT_SUBCODE_QUOTA_OUT_OF_RANGE = 82

An attempt was made to provision an endpoint with a quota that is out of range.

SOLCLIENT_SUBCODE_REPLAY_ANONYMOUS_NOT_SUPPORTED = 158

The client attempted to start replay on a flow bound to an anonymous queue.

SOLCLIENT_SUBCODE_REPLAY_CANCELLED = 142

A replay in progress on a flow was administratively cancelled, causing the flow to be unbound.

SOLCLIENT_SUBCODE_REPLAY_DISABLED = 134

Replay is not enabled in the message-vpn.

SOLCLIENT_SUBCODE_REPLAY_FAILED = 149

A replay in progress on a flow failed.

SOLCLIENT_SUBCODE_REPLAY_LOG_MODIFIED = 145

A replay in progress on a flow failed because the replay log was modified.

SOLCLIENT_SUBCODE_REPLAY_MESSAGE_REJECTED = 144

The Solace Message Router attempted to replay a message, but the queue/topic endpoint rejected the message to the sender.

SOLCLIENT_SUBCODE_REPLAY_MESSAGE_UNAVAILABLE = 140

A replay in progress on a flow failed because messages to be replayed were trimmed from the replay log.

SOLCLIENT_SUBCODE_REPLAY_NOT_SUPPORTED = 133

Replay is not supported on the Solace Message Router.

SOLCLIENT_SUBCODE_REPLAY_STARTED = 141

A replay was started on the queue/topic endpoint, either by another client or by an administrator on the message router.

SOLCLIENT_SUBCODE_REPLAY_START_MESSAGE_UNAVAILABLE = 156

A replay was requested but the requested start message is not available in the replay log.

SOLCLIENT_SUBCODE_REPLAY_START_TIME_NOT_AVAILABLE = 143

A replay was requested but the requested start time is not available in the replay log.

SOLCLIENT_SUBCODE_REPLAY_TEMPORARY_NOT_SUPPORTED = 138

Replay is not supported on temporary endpoints.

SOLCLIENT_SUBCODE_REPLICATION_IS_STANDBY = 95

An attempt to perform an operation using a VPN that is configured to be STANDBY for replication.

SOLCLIENT_SUBCODE_SELECTORS_NOT_SUPPORTED_ON_PARTITIONED_QUEUE = 160

The client attempted to use an egress selector when binding to a partitioned queue.

SOLCLIENT_SUBCODE_SELECTOR_MATCH_ERROR = 132

The client attempted to bind to a non-exclusive topic endpoint that is already bound with a different ingress selector.

SOLCLIENT_SUBCODE_SERVICE_UNAVAILABLE = 115

Guaranteed Delivery services are not enabled on the appliance.

SOLCLIENT_SUBCODE_SESSION_NOT_ESTABLISHED = 12

An API call failed due to the Session not being established.

SOLCLIENT_SUBCODE_SHARED_SUBSCRIPTIONS_ENDPOINT_NOT_ALLOWED = 153

The client attempted to add a shared subscription to a queue or topic endpoint.

SOLCLIENT_SUBCODE_SHARED_SUBSCRIPTIONS_NOT_ALLOWED = 152

The client attempted to add a shared subscription on a client that is not permitted to use shared subscriptions.

SOLCLIENT_SUBCODE_SHARED_SUBSCRIPTIONS_NOT_SUPPORTED = 151

The client attempted to add a shared subscription, but the capability is not supported by the appliance.

SOLCLIENT_SUBCODE_SPOOL_OVER_QUOTA = 71

Message was not delivered because the Guaranteed message spool is over its allotted space quota.

SOLCLIENT_SUBCODE_SUBSCRIPTION_ACL_DENIED = 68

Adding a subscription was denied because it matched a subscription that was defined on the ACL (Access Control List).

SOLCLIENT_SUBCODE_SUBSCRIPTION_ALREADY_PRESENT = 23

The client attempted to add a subscription which already exists. This subcode is only returned if the Session property SOLCLIENT_SESSION_PROP_IGNORE_DUP_SUBSCRIPTION_ERROR is not enabled.

SOLCLIENT_SUBCODE_SUBSCRIPTION_ATTRIBUTES_CONFLICT = 83

The client attempted to add a subscription which already exists but it has different properties

SOLCLIENT_SUBCODE_SUBSCRIPTION_INVALID = 25

The client attempted to add/remove a subscription that is not valid.

SOLCLIENT_SUBCODE_SUBSCRIPTION_MANAGER_DENIED = 80

An attempt was made to add a subscription to another client when Session does not have subscription manager privileges.

SOLCLIENT_SUBCODE_SUBSCRIPTION_MATCH_ERROR = 131

The client attempted to bind to a non-exclusive topic endpoint that is already bound with a different subscription.

SOLCLIENT_SUBCODE_SUBSCRIPTION_NOT_FOUND = 24

The client attempted to remove a subscription which did not exist. This subcode is only returned if the Session property SOLCLIENT_SESSION_PROP_IGNORE_DUP_SUBSCRIPTION_ERROR is not enabled.

SOLCLIENT_SUBCODE_SUBSCRIPTION_OTHER = 26

The appliance rejected a subscription add or remove request for a reason not separately enumerated.

SOLCLIENT_SUBCODE_SUBSCRIPTION_TOO_MANY = 31

The client attempted to add a subscription that exceeded the maximum number allowed.

SOLCLIENT_SUBCODE_SYNC_REPLICATION_INELIGIBLE = 161

A guaranteed message was rejected because the broker has been configured to reject messages when sync replication mode is ineligible. A transaction commit failed because replication became ineligible during the transaction.

SOLCLIENT_SUBCODE_TE_SHUTDOWN = 73

An attempt was made to bind to a shutdown Topic Endpoint.

SOLCLIENT_SUBCODE_TIMEOUT = 10

An API call failed due to a timeout.

SOLCLIENT_SUBCODE_TOO_MANY_CLIENTS = 22

The client login not currently possible because the maximum number of active clients on appliance has already been reached.

SOLCLIENT_SUBCODE_TOPIC_MISSING = 33

A send call was made that did not have a Topic in a mode where one is required (for example, client mode).

SOLCLIENT_SUBCODE_TOPIC_OR_SELECTOR_MODIFIED_ON_DURABLE_TOPIC_ENDPOINT = 148

A replay was in progress on a Durable Topic Endpoint (DTE) when its topic or selector was modified, causing the replay to fail.

SOLCLIENT_SUBCODE_TOPIC_TOO_LARGE = 16

An attempt was made to use a Topic that is longer than the maximum that is supported.

SOLCLIENT_SUBCODE_TRANSACTED_SESSION_NAME_IN_USE = 114

The client failed to open a Transacted Session as the Transacted Session name provided is being used by another opened session.

SOLCLIENT_SUBCODE_TRANSACTION_FAILURE = 119

The client attempted to commit a transaction with too many transaction steps.

SOLCLIENT_SUBCODE_UNBIND_RESPONSE_LOST = 125

The application called solClient_flow_destroy() and the unbind-response was not received.

SOLCLIENT_SUBCODE_UNEXPECTED_UNBIND = 65

An unexpected unbind response was received for a Queue or Topic Endpoint (for example, the Queue or Topic Endpoint was deleted from the appliance).

SOLCLIENT_SUBCODE_UNKNOWN_CLIENT_NAME = 81

An attempt was made to add a subscription to another client that is unknown on the appliance.

SOLCLIENT_SUBCODE_UNKNOWN_DTE_NAME = 62

Deprecated name; SOLCLIENT_SUBCODE_UNKNOWN_TE_NAME is preferred.

SOLCLIENT_SUBCODE_UNKNOWN_FLOW_NAME = 94

The session was disconnected due to loss of the publisher flow state. All (unacked and unsent) messages held by the API were deleted. To connect the session, applications need to call SolClient_session_connect again.

SOLCLIENT_SUBCODE_UNKNOWN_QUEUE_NAME = 61

An attempt was made to bind to an unknown Queue name (for example, not configured on appliance).

SOLCLIENT_SUBCODE_UNKNOWN_START_LOCATION_TYPE = 139

The client attempted to start a replay but provided an unknown start location type.

SOLCLIENT_SUBCODE_UNKNOWN_TE_NAME = 62

An attempt was made to bind to an unknown Topic Endpoint name (for example, not configured on appliance).

SOLCLIENT_SUBCODE_UNRESOLVED_HOST = 89

The client failed to connect because the host name could not be resolved.

SOLCLIENT_SUBCODE_UNSUBSCRIBE_NOT_ALLOWED_CLIENTS_BOUND = 86

The client attempted to unsubscribe a Topic from a Topic Endpoint while there were still Flows bound to the endpoint.

SOLCLIENT_SUBCODE_UNTRUSTED_CERTIFICATE = 99

The client attempted to connect to an appliance that has a suspect certificate.

SOLCLIENT_SUBCODE_UNTRUSTED_CLIENT_CERTIFICATE = 105

The client failed to connect to an appliance as it has a suspect client certificate.

SOLCLIENT_SUBCODE_UNTRUSTED_COMMONNAME = 100

The client attempted to connect to an appliance that has a suspect common name.

SOLCLIENT_SUBCODE_USER_DATA_TOO_LARGE = 15

An attempt was made to send a message with user data larger than the maximum that is supported.

SOLCLIENT_SUBCODE_XML_PARSE_ERROR = 18

The appliance could not parse an XML message.

solace.messaging.config.transport_protocol_configuration module

This module contains the abstract base class for transport configuration. The methods available in the TransportProtocolConfiguration class must be derived classes to permit applications to configure the underlying transport.

class solace.messaging.config.transport_protocol_configuration.TransportProtocolConfiguration

Bases: ABC

An abstract class that provides the configuration for the transport protocol layer configuration. The methods in this class must be derived classes to permit applications to configure the underlying transport.

abstract with_connection_retry_strategy(strategy: RetryStrategy) TransportProtocolConfiguration

Apply strategy related to connection.

Connection retry strategy applies when initially establishing a MessagingService connection and the connection attempt fails. If an established connection fails, see TransportProtocolConfiguration.with_reconnection_retry_strategy().

Parameters:

strategy (RetryStrategy) – The retry configuration.

Returns:

Instance of the transport configuration that can be used for method chaining.

Return type:

TransportProtocolConfiguration

abstract with_message_compression(compression_factor: int) TransportProtocolConfiguration

Sets the compression level for all messages sent as a messaging service.

Parameters:

compression_factor (int) – Enables messages to be compressed with ZLIB before transmission and decompressed on receive. The valid values to use are 0 (off) or 1..9, where 1 is least amount of compression (fastest) and 9 is the most amount of compression (slowest).

Returns:

Instance of the transport configuration that can be used for method chaining.

Return type:

TransportProtocolConfiguration

abstract with_reconnection_retry_strategy(strategy: RetryStrategy) TransportProtocolConfiguration

Applies the retry strategy related to a reconnection. Reconnection strategy applies when an established MessagingService connection fails and needs to be reconnected. If an initial connection fails, see with_connection_retry_strategy()

Parameters:

strategy (RetryStrategy) – The retry strategy configuration.

Returns:

Instance of the transport configuration that can be used for method chaining.

Return type:

TransportProtocolConfiguration

abstract with_transport_security_strategy(transport_layer_security_strategy: TransportSecurityStrategy) TransportProtocolConfiguration

Set the Transport Layer Security (TLS) configuration on the messaging service.

Parameters:

transport_layer_security_strategy (TransportSecurityStrategy) – The configuration for the transport layer security.

Returns:

Instance of the transport configuration that can be used for method chaining.

Return type:

TransportProtocolConfiguration

solace.messaging.config.transport_security_strategy module

This module contains abstract base class for strategies for transport security and its concrete implementations.

The following implementations of TransportSecurityStrategy exist:

class solace.messaging.config.transport_security_strategy.TLS

Bases: TransportSecurityStrategy

A concrete class derived from TransportSecurityStrategy and extended to support TLS configuration.

class SecureProtocols(value)

Bases: Enum

The enumeration of secure protocols that may be specified in the TLS.with_excluded_protocols().

SSLv3 = 'SSLv3'
TLSv1 = 'TLSv1'
TLSv1_1 = 'TLSv1.1'
TLSv1_2 = 'TLSv1.2'
static create() TLS

Creates a TLS instance.

Returns:

An transport layer security object.

Return type:

TLS

downgradable() TLS

Configures TLS so that session connection is downgraded to plain text after client authentication.

Warning

Downgrading SSL to plain-text after after client authentication exposes a client and the data being sent to higher security risks.

Returns:

A transport layer security object for method chaining.

Return type:

TLS

property security_configuration: dict

Retrieves the security configuration.

Returns:

A dictionary with the security configuration.

Return type:

dict

with_certificate_validation(ignore_expiration: bool, validate_server_name: bool = True, trust_store_file_path: str | None = None, trusted_common_name_list: str | None = None) TLS

Configures TLS validation on certificates. By default validation is performed.

Warning

If you disable certificate validation, it exposes clients and data being sent to higher security risks.

Parameters:
  • ignore_expiration (bool) – When set to True, then expired certificate will be accepted. It is important to note that ignoring expired certificates exposes a client and data being sent to higher security risks.

  • validate_server_name (bool) – When set to True, then certificates without the matching host will not be accepted.

  • trust_store_file_path (str) – The location of the trust store files.

  • trusted_common_name_list – Specifies a comma-delimited list of acceptable common names for matching with server certificates. The API performs a case-insensitive comparison of the common names provided in this property with the common name in the server certificate. Note that leading and trailing whitespaces are considered to be part of the common names and are not ignored.

Returns:

A transport layer security object for method chaining.

Return type:

TLS

with_cipher_suites(cipher_suites_list: str) TLS

Configures cipher suites. The cipher suites value list must be from the solace.messaging.config.solace_properties.CIPHER_SUITES().

Parameters:

cipher_suites_list (str) – The list of the cipher suites.

Returns:

A transport layer security object for method chaining.

Return type:

TLS

with_excluded_protocols(*args: SecureProtocols) TLS

Specifies the list of SSL or TLS protocols not to use.

Parameters:

args (SecureProtocols) – The SSL or TLS protocols to not use.

Returns:

A transport layer security object with the excluded protocols.

Return type:

TLS

without_certificate_validation() TLS

Configures TLS not to validate server certificates.

Warning

If you disable certificate validation, it exposes clients and data being sent to higher security risks.

Returns:

A transport layer security object for method chaining.

Return type:

TLS

class solace.messaging.config.transport_security_strategy.TransportSecurityStrategy

Bases: ABC

An abstract class to represent a transport security strategy.

This class exists to provide a common interface class for all TransportSecurityStrategy objects.

abstract property security_configuration: dict

Retrieves the security configuration.

Returns:

A dictionary object containing the TLS configuration method to get the security configuration

Return type:

dict

solace.messaging.config.updatable_configuration module

This module contains the class for updating the configuration of an API object.

class solace.messaging.config.updatable_configuration.UpdatableConfiguration

Bases: ABC

abstract update_property(name: str, value: Any)

Updates configuration property. Modification of a property may or may not occur instantly.

Parameters:
  • name (str) – The name of the property to modify. None values are not accepted

  • value (Any) – The new value of the property. None values are not accepted

Raises: