## Contents

- Namespaces
- Classes

namespace solace

## Namespaces Top

AuthenticationScheme | Represents authentication schemes that can be used. The corresponding session property is solace.SessionProperties#authenticationScheme.
CacheLiveDataAction | solace.CacheLiveDataAction Enumeration of CacheLiveDataAction values, specifying how the CacheSession should handle live data associated with a cache request in progress.
CacheReturnCode | Enumeration of CacheReturnCode types. The method solace.CacheRequestResult#getReturnCode returns on of these basic results of a cache request. More details are available in the associated solace.CacheReturnSubcode, retrieved by solace.CacheRequestResult#getReturnSubcode.
CacheReturnSubcode | Enumeration of CacheReturnSubcode types.
CapabilityType | Represents an enumeration of peer capabilities.
ClientCapabilityType | Represents an enumeration of client capabilities. These are sent in the ClientCtrl login messages.
DestinationType | Enumerates destination types for destination objects.

ErrorSubcode

Defines an error subcode enumeration which is returned as a property of the errors/exceptions thrown by the API. The subcode provides more detailed error information.

The following subcodes can apply to error responses resulting from any API method.

- solace.ErrorSubcode.PARAMETER_OUT_OF_RANGE
- solace.ErrorSubcode.PARAMETER_CONFLICT
- solace.ErrorSubcode.INTERNAL_ERROR

LogLevel | Represents a log level enumeration.

MessageCacheStatus

An attribue of a solace.Message. Applications receive messages due to subscriptions on topics, or consumers connected to durable objects. The MessageCacheStatus of such messages is: solace.MessageCacheStatus.LIVE.

Message are also delivered to an application as a result of a cache request (see solace.CacheSession#sendCacheRequest) which have a MessageCacheStatus that is solace.MessageCacheStatus.CACHED or solace.MessageCacheStatus.SUSPECT.

The MessageCacheStatus is retrieved with solace.Message#getCacheStatus.

MessageConsumerAcknowledgeMode

An enumeration of consumer acknowledgement modes. The corresponding MessageConsumer property solace.MessageConsumerProperties#acknowledgeMode configures how acknowledgments are generated for received Guaranteed messages.

When received messages are acknowledged they are removed from the Guaranteed Message storage on the Solace Message Router. Message Consumer acknowledgements, only remove messages from the Solace Message Router.

In particular, withholding Message Consumer Acknowledgemnts does not stop message delivery. For Message Consumer flow control see solace.MessageConsumer.stop/solace.MessageConsumer.start. Message Consumer flow control may also be imlpemented by removing the solace.MessageConsumerEventName#event:MESSAGE listener.

MessageConsumerEventName

An enumeration of message consumer event names. A solace.MessageConsumer will emit these events as part of its lifecycle. Applications, having created a MessageConsumer can choose to listen to all of the events described here, or any subset of these events. For Example:

        mc = solace.Session.createMessageConsumer(...);
        mc.on(solace.MessageConsumerEventName.CONNECT_FAILED_ERROR,
              function connectFailedErrorEventCb(error) {
                // error can be used as an OperationError object
              });

MessageDeliveryModeType | Represents an enumeration of message delivery modes.
MessageDumpFlag | Represents an enumeration of message dump formats. It controls the output of solace.Message#dump.
MessagePublisherAcknowledgeMode | Represents authentication scheme enumeration.
MessageType | Represents an enumeration of message payload types (see solace.Message#getBinaryAttachment) A message may contain unstructured byte data, or a structured container.

MessageUserCosType

Represents an enumeration of user Class of Service (COS) levels. The COS is set on a Message with solace.Message#setUserCos The Class of Service has different semantics for direct and guaranteed messages.

For messages published with solace.MessageDeliveryModeType.DIRECT, the class of service selects the weighted round-robin delivery queue when the message is forwarded to a consumer. solace.MessageUserCosType.COS1 are the lowest priority messages and will use the Solace Message Router D-1 delivery queues.

For messages published as guaranteed messages (solace.MessageDeliveryModeType.PERSISTENT or solace.MessageDeliveryModeType.NON_PERSISTENT), messages published with solace.MessageUserCosType.COS1 can be rejected by the Solace Message Router if that message would cause any queue or topic-endpoint to exceed its configured low-priority-max-msg-count.

MutableSessionProperty | Represents an enumeration of session properties that can be modified by solace.Session.updateProperty after the solace.Session is originally created. These correspond to session properties in solace.SessionProperties.
QueueAccessType | Represents the possible endpoint access types. The corresponding endpoint property is solace.QueueProperties#accessType.

QueueBrowserEventName

An enumeration of queue browser event names. A solace.QueueBrowser will emit these events as part of its lifecycle. Applications, having created a QueueBrowser can choose to listen to all of the events described here, or any subset of these events. For Example:

        qb = solace.Session.createQueueBrowser(...);
        qb.on(solace.QueueBrowserEventName.CONNECT_FAILED_ERROR,
              function connectFailedErrorEventCb(error) {
                // details is an OperationError object
              });

QueueDiscardBehavior | Enumerates the behavior options when a message cannot be added to an endpoint (for example, the maximum quota solace.QueueProperties#quotaMB was exceeded).

QueuePermissions

Represents the permissions applicable to a queue.

The corresponding endpoint property is solace.QueueProperties#permissions.

The access controls:

- the permissions for all other users of the queue, this only applies to non-durable queues solace.QueueProperties#permissions;
- for the current Message Consumer on a queue or endpoint, solace.MessageConsumer.permissions

For example, creating a temporary topic endpoint with MODIFY_TOPIC will allow other users to modify the topic subscribed to that endpoint.

QueueType | Specifies the type of remote resource to which an solace.AbstractQueueDescriptor refers.
RequestEventCode | An attribute of solace.RequestError. This enumeration represents the different errors emitted by solace.Session.requestFailedCallback when a solace.Session#sendRequest fails. The client application receives a request error with event code solace.RequestEventCode.REQUEST_ABORTED when the underlying connection is successfully closed, or closed as a result of a communication error.
SDTFieldType | An enumeration of all SDT data types.
SDTValueErrorSubcode | Enumeration of solace.SDTUnsuportedValueError causes.

SessionEventCode

An attribute of SessionEvent. This enumeration represents the different events emitted by Session through the session event callback.

When a session is no longer in a usable state, the API tears down the underlying connection and notifies the application with one of the following session events:

- solace.SessionEventCode#event:DOWN_ERROR
- solace.SessionEventCode#event:CONNECT_FAILED_ERROR

SolclientFactory

A singleton used as the main factory for the messaging APIs. The very first operation by any application must be to initialize the API:

- solace.SolclientFactory.init

SolclientFactory provides methods to construct:

- solace.Session
- solace.Message
- solace.Destination

Additionally SolclientFactory manages the logging level in the API.

SolclientFactoryProfiles | The collection of predefined factory profiles available for application use. See each member for a description of its configuration.
SslDowngrade | Effectively a boolean governing TLS downgrade to plain text after authentication.
StatType | Statistics for sent/received messages and control operations.
Version | Returns the API version. Use version, date and mode properties for build details. Use the summary property or the .toString() method to return a summary.

## Classes Top

AbstractQueueDescriptor | This class is not exposed for construction by API users. This is a base class for solace.QueueDescriptor. API users should access the methods described here through a solace.QueueDescriptor.
CacheCBInfo | Encapsulates a solace.CacheSession's request listener callback function and optional application-specified context object. Instances of this class are required as a parameter to solace.CacheSession#sendCacheRequest when creating a CacheSession request.
CacheRequestResult | This class is not exposed for construction by API users. A CacheRequestResult object is provided on the callback (see solace.CacheCBInfo.cacheRequestCallback when a cache request completes. An object that indicates the termination of a cache request, and provides details how it concluded.

CacheSession

This class is not exposed for construction by API users. Users should obtain an instance from solace.Session#createCacheSession

A session for performing cache requests.

Applications must use solace.Session#createCacheSession to construct this class.

The supplied solace.CacheSessionProperties will be copied. Subsequent modifications to the passed properties will not modify the session. The properties may be reused.

CacheSessionProperties | Encapsulates the properties of a cache session.

Destination

This class is not exposed for construction by API users. Users should obtain an instances from one of the following:

- solace.SolclientFactory.createTopicDestination
- solace.SolclientFactory.createDurableQueueDestination
- solace.MessageConsumer#getDestination
- solace.SDTField#getValue when solace.SDTField#getType returns solace.SDTFieldType.DESTINATION.

Represents a message destination.

Publishers can send messages to topics or queues, to which subscribers can subscribe or bind. A Destination specifies the target of such an operation.

LogImpl | A class that provides a binding to a log implementation. Applications that need to control API logging must construct a LogImpl instance, a log implementation that can be set in solace.SolclientFactoryProperties#logger. The binding will call the supplied log methods with the parameters supplied to each.

Message

This class is not exposed for construction by API users. Users should obtain an instance from solace.SolclientFactory.createMessage

A message is a container that can be used to store and send messages to and from the Solace Message Router.

Applications manage the lifecycle of a message; a message is created by calling solace.SolclientFactory.createMessage and is freed by dereferencing it.

API operations that cache or mutate messages always take a copy. A message may be created, mutated by the API user, and sent multiple times.

The Message Object provides methods to manipulate the common Solace message header fields that are optionally sent in the binary metadata portion of the Solace message.

Applications can also use the structured data API solace.Message#setSdtContainer to add containers (maps or streams) and their fields to the binary payload or to the User Property map contained within the binary metadata.

This does not prevent applications from ignoring these methods and sending payload in the binary payload as an opaque binary field for end-to-end communications

MessageConsumer

This class is not exposed for construction by API users. A Message Consumer is created by calling solace.Session#createMessageConsumer.

A MessageConsumer controls Guaranteed Message delivery to this client.

Consumer characteristics and behavior are defined by solace.MessageConsumerProperties. The properties can also be supplied as a simple key-value {Object}. The queue descriptor, solace.MessageConsumerProperties#queueDescriptor must be specified to identify the Guaranteed Message Queue or Guaranteed Message Topic Endpoint on the Solace Message Router.

The MessageConsumer object is an EventEmitter, and will emit events to which the application may choose to subscribe, such as the connection to the Solace Message Router going up or down.

If a registered listener for an emitted event throws an exception, this is caught and emitted as an 'error'.

MessageConsumerEvent | Message consumer event objects. A solace.MessageConsumer will emit these events related to queue subscription management: MessageConsumerEventName.SUBSCRIPTION_OK and MessageConsumerEventName.SUBSCRIPTION_ERROR. Similar to SessionEvent. Also compatible with RequestError.
MessageConsumerProperties | Defines the properties for a solace.MessageConsumer.
MessagePublisherProperties | Properties that define the configuration for a guaranteed message publisher.
MessageRxCBInfo | Encapsulates the session's message receive callback function and an optional user-specified object. This class is passed to solace.SolclientFactory.createSession when creating a session.
NotImplementedError | This class is not exposed for construction by API users. An error thrown when calling an API that has not been implemented.
OperationError | This class is not exposed for construction by API users. An error thrown by the API when an operational error is encountered.

QueueBrowser

This class is not exposed for construction by API users. A Queue Browser is created by calling solace.Session#createQueueBrowser.

A Queue Browser allows client applications to look at messages spooled on Endpoints without removing them. Messages are browsed from oldest to newest. After being browsed, messages are still available for consumption over normal flows. However, it is possible to selectively remove messages from the persistent store of an Endpoint. In this case, these removed messages will no longer be available for consumption. Note: If browsing a queue with an active consumer, no guarantee is made that the browser will receive all messages published to the queue. The consumer can receive and acknowledge messages before they are delivered to the browser.

One typical application is to use Browsers to allow message bus administrators to remove “stuck” Guaranteed messages from an Endpoint without having to modify or disrupt existing applications. A message can get stuck if:

1) It has been received by an application, but for some reason, that application has failed to acknowledge it. 2) All active message selectors have failed to match this particular message and therefore the message bus has not delivered it to any client yet. The current release only supports browsing Endpoints of type Queue.

Note that the delivery restrictions imposed by the queue’s Access type (exclusive or non-exclusive), do not apply when browsing messages with a Browser.

Browser characteristics and behavior are defined by solace.QueueBrowserProperties. The properties can also be supplied as a simple key-value {Object}. The queue descriptor, solace.QueueBrowserProperties#queueDescriptor must be specified to identify the Guaranteed Message Queue on the Solace Message Router.

The Browser is an EventEmitter, and will emit events to which the application may choose to subscribe, such as the connection to the Solace Message Router going up or down.

If a registered listener for an emitted event throws an exception, this is caught and emitted as an 'error'.

QueueBrowserProperties | Defines the properties for a solace.QueueBrowser.
QueueDescriptor | QueueDescriptor
QueueProperties | Represents a queue properties object. May be passed in to solace.Session#createMessageConsumer when creating a solace.MessageConsumer object. Upon creation of a queue, undefined queue properties are set to default values chosen by the router.

ReplayStartLocation

- This class is not exposed for construction by API users. Users should obtain an instances from one of the following:
- solace.SolclientFactory.createReplayStartLocationBeginning
- solace.SolclientFactory.createReplayStartLocationDate

Defines the ReplayStartLocation class. The ReplayStartLocation is set in the corresponding MessageConsumer property solace.MessageConsumerProperties#replayStartLocation The single member variable, _replayStartTime is undefined in ReplayStartLocationBeginning and contains the elapsed time in milliseconds since the epoch in ReplayStartLocationDate

ReplayStartLocationBeginning

- This class is not exposed for construction by API users. Users should obtain an instances from the following:
  - solace.SolclientFactory.createReplayStartLocationBeginning

Defines the ReplayStartLocation class. The ReplayStartLocation is set in the corresponding MessageConsumer property solace.MessageConsumerProperties#replayStartLocation

ReplayStartLocationDate

- This class is not exposed for construction by API users. Users should obtain an instances from the following:
  - solace.SolclientFactory.createReplayStartLocationDate

Defines the ReplayStartLocation class. The ReplayStartLocation is set in the corresponding MessageConsumer property solace.MessageConsumerProperties#replayStartLocation

ReplicationGroupMessageId

This class is not exposed for construction by API users. Users should obtain an instance from solace.SolclientFactory.createReplicationGroupMessageId or from solace.Message.getReplicationGroupMessageId

ReplicationGroupMessageId specifies a Replication Group Message ID. Can be used to specify a solace.ReplayStartLocation for the message after this id. The ReplayStartLocation is set in the corresponding MessageConsumer property solace.MessageConsumerProperties#replayStartLocation.

RequestError | This class is not exposed for construction by API users. Represents a request failure event; request failure events are passed to the application event handling callback provided when sending the request solace.Session#sendRequest

SDTField

This class is not exposed for construction by API users.

Represents a SDT (Structured Data Type) field. To create an instance of an `SDTField`, call solace.SDTField.create.

SDTField objects are used in Solace Containers (solace.SDTMapContainer and solace.SDTStreamContainer). The deprecated usage of solace.SDTMapContainer#addField and solace.SDTStreamContainer#addField take a SDTField object as an argument. The preferred usage is to pass a solace.SDTFieldType and value as arguments.

SDTField objectts must be used as an argument to solace.Message#setSdtContainer. The only valid SDTField objects for solace.Message#setSdtContainer are:

- solace.SDTFieldType.STREAM
- solace.SDTFieldType.MAP
- solace.SDTFieldType.STRING

SDTMapContainer | Defines a Structured Data Type (SDT) map container.
SDTStreamContainer | Defines a Structured Data Type (SDT) stream container. A stream is an iterable collection of solace.SDTFields.

SDTUnsupportedValueError

This class is not exposed for construction by API users.

Represents a SDT unsupported value error. An SDT field was assigned a value that is within the type range for the given SDT type, but is not supported on this platform/runtime. This occurs when a received solace.SDTContainerMap or solace.SDTContainerStream contains a field with a value that can not represented in the local architecture. Possible causes include:

- receive 64 bit integer that cannot be represented accurately in a javaScript number. JavaScript numbers are floats and can only hold a 48 bit integer without loss of precission. Any integer greater than 281474976710655 or less than -281474976710655 will cause this exception.

Session

This class is not exposed for construction by API users. Applications must use solace.SolclientFactory.createSession to create a session.

Represents a client Session.

Session provides these major functions:

- Subscriber control, such as updating subscriptions;
- Publishes both Direct and Guaranteed Messages to the router;
- Receives direct messages from the router.

The Session object is an EventEmitter, and will emit events with event names from solace.SessionEventCode when Session events occur. Each session event can be subscribed using solace.Session#on with the corresponding solace.SessionEventCode. If any of the registered event listeners throw an exception, the exception will be emitted on the 'error' event.

SessionEvent | Represents a session event; events are passed to the application-provided event handling callback provided when creating the session.
SessionEventCBInfo | Encapsulates the session's event callback function and an optional user-specified object. This class is passed to solace.SolclientFactory.createSession when creating a session.
SessionProperties | Represents a session properties object. Passed in to solace.SolclientFactory.createSession when creating a solace.Session instance.
SolaceError | This class is not exposed for construction by API users. The base class for all errors thrown by the API.
SolclientFactoryProperties | Properties used during initialization of solace.SolclientFactory.
Topic | Represents a Topic, which is a type of solace.Destination.