SPL File topics.spl

Toolkits > com.ibm.streamsx.topology 2.1.0 > com.ibm.streamsx.topology.topic > topics.spl

Topic based publish-subscribe model for streams. Supports a microservice architecture for IBM Streams applications where streams are published to topics and can be subscribed to be independent applications. Use of interchange schema types allows applications to be implemented in different langauges, including SPL, Python, Java & Scala.

Content

Operators
  • Publish: Publish a stream to a topic.
  • Subscribe: Subscribe to topics using a topic filter.
Functions

Composites

composite Publish(input In)

Publish a stream to a topic. Allows other IBM Streams applications to subscribe to the input stream, including those written in different languages. See namespace:com.ibm.streamsx.topology.topic for details.

Parameters

Input Ports

composite Subscribe(output Topic)

Subscribe to topics using a topic filter. Generates a stream that is subscribed, through IBM Streams dynamic connections, to all streams published to topics that match the topic filter topic and are an exact stream type match to streamType.

See namespace:com.ibm.streamsx.topology.topic for details.

Parameters

Output Ports

Functions

rstring getTopicSubscription(rstring topic)

Get the subscription that matches a topic for topic based subscription.

This is a low-level function that allows applications to build custom composites with functionality similar to Subscribe. The preference should be to use Subscribe where possible.

Parameters

Returns

rstring addUDPSubscription(rstring subscription)

Take a subscription and modify it to account for parallel regions in the publisher or subscriber.

This is a low-level function that allows applications to build custom composites with functionality similar to Subscribe or FilteredSubscribe. The preference should be to use Subscribe or FilteredSubscribe where possible.

Parameters

Returns

int32 setSubscribeSubscription(rstring subscription)

Set a subscription expression adding in UDP channel based matching if the subscriber is in a parallel region.

Parameters

Returns

boolean checkTopicName(rstring topic)

Check a topic name is valid.

Parameters

Returns

boolean checkTopicFilter(rstring topic)

Check a topic filter is valid.

Parameters

Returns