Relationship to Export & Import

Toolkits > com.ibm.streamsx.topology 2.1.0 > com.ibm.streamsx.topology.topic > Relationship to Export & Import

Publish-subscribe is a simplification of IBM Streams Export and Import.

It is recommended that SPL applications do not use stream properties for Export that start with __spl_ (double underscore - spl - underscore) to avoid clashes with functionality provided by this toolkit.

Details

Publish is a composite operator that invokes an spl.adapter::Export operator using these stream properties:
  • int64 __spl_version: Version of the publish properties scheme, set to.
    • unset - Initial version - 1.1.2 release
    • 2 - Second version - 1.1.6 release - Support for filtering and parallel regions
    • 3 - Third version - 1.3.0 release - Support for topic filters with wildcards
  • rstring __spl_exportType : Set to the literal topic for SPL publish, topic.java for publishing by a Java class.
  • rstring __spl_topic : Set to the topic to publish to.
  • rstring __spl_allowFilter : Set to true if the Publish operator allows filters, otherwise false. Earlier releases have the value missing indicating filters are allowed.
    • Set if:__spl_version >= 2
  • rstring __spl_class : Set to the Java class of the stream when __spl_exportType is topic.java, otherwise unset.
  • int64 __spl_channel : Set to the publisher's parallel channel index returned by getChannel().
    • Set if:__spl_version >= 2
  • int64 __spl_maxChannels : Set to the publisher's maximum number of parallel channels returned by getMaxChannels().
    • Set if:__spl_version >= 2
  • list<rstring> __spl_topicLevels : list of the levels within the topic.
    • Set if:__spl_version >= 3
  • int64 __spl_topicLevelCount : count of the levels within the topic.
    • Set if:__spl_version >= 3
  • int64 __spl_randomId : Random value between 0 and 2147483647. Note a new random value is generated when the PE restarts. Used when a subscriber is in a parallel region to randomly distribute non-parallel or single channel publishers across the subscriber channels.
    • Set if:__spl_version >= 3

Subscribe is a composite operator that invokes an spl.adapter::Import operator using a subscription to match the published topics.