public class MQTTUtils
extends Object
Constructor and Description |
---|
MQTTUtils() |
Modifier and Type | Method and Description |
---|---|
static JavaReceiverInputDStream<String> |
createStream(JavaStreamingContext jssc,
String brokerUrl,
String topic)
Create an input stream that receives messages pushed by a MQTT publisher.
|
static JavaReceiverInputDStream<String> |
createStream(JavaStreamingContext jssc,
String brokerUrl,
String topic,
StorageLevel storageLevel)
Create an input stream that receives messages pushed by a MQTT publisher.
|
static ReceiverInputDStream<String> |
createStream(StreamingContext ssc,
String brokerUrl,
String topic,
StorageLevel storageLevel)
Create an input stream that receives messages pushed by a MQTT publisher.
|
public static ReceiverInputDStream<String> createStream(StreamingContext ssc, String brokerUrl, String topic, StorageLevel storageLevel)
ssc
- StreamingContext objectbrokerUrl
- Url of remote MQTT publishertopic
- Topic name to subscribe tostorageLevel
- RDD storage level. Defaults to StorageLevel.MEMORY_AND_DISK_SER_2.public static JavaReceiverInputDStream<String> createStream(JavaStreamingContext jssc, String brokerUrl, String topic)
jssc
- JavaStreamingContext objectbrokerUrl
- Url of remote MQTT publishertopic
- Topic name to subscribe topublic static JavaReceiverInputDStream<String> createStream(JavaStreamingContext jssc, String brokerUrl, String topic, StorageLevel storageLevel)
jssc
- JavaStreamingContext objectbrokerUrl
- Url of remote MQTT publishertopic
- Topic name to subscribe tostorageLevel
- RDD storage level.