diff --git a/README.md b/README.md index a07bc15..c5ef1f4 100644 --- a/README.md +++ b/README.md @@ -167,10 +167,10 @@ Get all available streams ## Using the SDK ### Getting list of data stream available -List all available data stream for the user. +List all available data topics for which a schema is available. ```java // Example1.java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String[] topics = ncdsClient.ListTopicsForTheClient(); System.out.println("Entitled DataSet Topics:" ); for (String topicEntry : topics) { @@ -190,7 +190,7 @@ NLSCTA This methods returns the schema for the stream in Apache Avro format (https://avro.apache.org/docs/current/spec.html). ```java // Example2.java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String topic = "GIDS"; String schema = ncdsClient.getSchemaForTheTopic(topic); System.out.println(schema); @@ -243,7 +243,7 @@ Example output: This returns the first 10 available messages of the stream. ```java // Example2.java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String topic="NLSCTA"; ConsumerRecords records = ncdsClient.topMessages(topic); for (ConsumerRecord record : records) { @@ -279,7 +279,7 @@ value:{"SoupPartition": 0, "SoupSequence": 10, "trackingID": 11231714853049, "ms This returns the first 10 available messages of the stream from given timestamp in milliseconds since the UNIX epoch. ```java // Example3.java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String topic="NLSCTA"; Long timestamp = 1590084445610L; // This is timestamp in millseconds from UNIX epoch. (https://currentmillis.com/) ConsumerRecords records = ncdsClient.topMessages(topic, timestamp); @@ -317,7 +317,7 @@ value :{"SoupPartition": 0, "SoupSequence": 9362639, "trackingID": 5084560059456 ### Get example message from stream Print message to the console for given message name. ```java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String topic="GIDS" ncdsClient.getSampleMessages(topic, "SeqIndexDirectory"); ``` @@ -328,7 +328,7 @@ Example output: ### Get Continuous stream ```java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String topic="GIDS" Consumer consumer = ncdsClient.NCDSKafkaConsumer(topic); while (true) { @@ -344,7 +344,7 @@ while (true) { ### Get News stream ```java -NCDSClient ncdsClient = new NCDSClient(); +NCDSClient ncdsClient = new NCDSClient(Properties securityCfg,Properties kafkaCfg); String topic="NEWS-PRO-GLOBAL" Consumer consumer = ncdsClient.NCDSNewsKafkaConsumer(topic); while (true) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy