SDT Containers

The messaging APIs support two types of composite containers:

  • Map

    A map is a structured data container in which each data field is associated with a key. A map allows the application to perform keyed lookups. Keyed lookups allow direct access to data, which means that the publisher and receiver do not have to agree on the exact format of the data.

    A map can contain maps and streams.

    Maps support the following operations:

    • Adding data to fields with associated keys. In the C and .NET APIs, data fields are added at the end of the container; therefore, the add routine might not detect duplicate keys.
    • Deleting data fields according to their keys.
    • Iterating sequentially through the data fields stored in the map.
    • Retrieving elements accorded to their keys.
  • Stream

    A stream is a structured data container that is a sequence of unkeyed data fields. A stream is processed faster than a map, but a stream can only be accessed sequentially from beginning to end, and the sender and receiver must agree on a predefined data structure. A stream can contain maps and streams.

    Streams support the following operations:

    • Adding/appending fields to the end of the stream.
    • Iterating sequentially through the fields stored in the stream.

For a comprehensive list of the available container methods and functions that can be used for operations such as setting data for and getting data from fields, and iterating through or deleting fields, see PubSub+ Messaging APIs for the appropriate messaging API. The table below lists relevant interfaces or function groups.

Available Container Methods and Functions

PubSub+ Messaging API Use

C

  • solClient_container functions

.NET

  • ISDTContainer interface, which provides:

  • ISDTContainer methods

  • IMapContainer methods

  • IStreamContainer methods

JavaScript and Node.js

  • solace.SDTMapContainer methods

  • solace.SDTStreamContainer methods