SDT Containers in the PubSub+ JCSMP API

The PubSub+ JCSMP API supports 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.
    • 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 the PubSub+ Messaging API for JCSMP reference.

In the PubSub+ JCSMP API the two SDT interfaces are:

  • SDTMap interface

  • SDTStream interface