public class PublishSubscribe extends Object
publishedto a topic and then
subscribedto by other topologies.
A published topic has a type and subscribers must subscribe using the same
topic and type (inheritance matching is not supported).
Multiple streams from different topologies can be published to same topic (and type) and there can be multiple subscribers from different topologies.
A subscriber can exist before a publisher exists, they are connected automatically when the job starts.
PublishSubscribeService is registered then published
tuples are discarded and subscribers see no tuples.
The recommended style for topics is MQTT topics, where
is used to provide a hierarchy into topics. For example
might be a topic that represents temperature sensors in an engine.
Topics that start with
edgent/ are reserved for use by Edgent.
MQTT style wild-cards are not supported.
|Modifier and Type||Field and Description|
Topics that start with "edgent/" are reserved for use by Edgent.
|Constructor and Description|
|Modifier and Type||Method and Description|
Publish this stream to a topic.
Subscribe to a published topic.
T- Tuple type
stream- stream to publish
topic- Topic to publish to.
streamType- Type of objects on the stream.
subscribe(TopologyElement, String, Class)
public static <T> TStream<T> subscribe(TopologyElement te, String topic, Class<T> streamType)
T- Tuple type
te- TopologyElement whose Topology to add to
topic- Topic to subscribe to.
streamType- Type of the stream.
publish(TStream, String, Class)
Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.