Toolkits > com.ibm.streamsx.topology 2.1.0 > com.ibm.streamsx.topology.topic > connect.spl
Connection modes for Subscribe operator.
Connection mode
The connection mode describes how a subscriber is connected to all matching publishers. The supported modes are:
Note: The connect parameter is of SPL type operator, accepting an operator kind. It may specifed as the fully qualified name ( com.ibm.streamsx.topology.topic::Buffered ) or the simple name Buffered following a use statement.
The Buffered mode may be additionally configured by the bufferFullPolicy and bufferCapacity parameters.
In order for the exportatory microservices to not impact the production critical publishers they are configured to to use connection mode Buffered with a drop policy of either Sys.DropFirst or Sys.DropLast.
For example a subscriber that is buffered from any publisher and drops oldest tuples when the buffer is full:
use com.ibm.streamsx.topology::Json; use com.ibm.streamsx.topology.topic::Buffered; use com.ibm.streamsx.topology.topic::Subscribe; public composite LocationAnalyticsService { graph stream<Json> Locations = Subscribe() { param topic: 'vehicles/+/locations'; streamType: Json; connect: Buffered; bufferFullPolicy: Sys.DropFirst; } // processing of Locations omitted }
Directly connect subscriber to publisher.
Used as a value for Subscribe connect parameter.
Warning: This operator is only intended for use with Subscribe through its connect parameter. Parameters are subject to change in order support evolution of Subscribe.
Connect subscriber to publisher using a buffer.
Used as a value for Subscribe connect parameter.
Warning: This operator is only intended for use with Subscribe through its connect parameter. Parameters are subject to change in order support evolution of Subscribe.