rkafka | R Documentation |
It provides functionalities of creating a 'Kafka' producer, simple consumer,high level consumer and sending and receiving messages.
Package: | rkafka |
Type: | Package |
Version: | 1.3 |
Date: | 2021-12-05 |
License: | Apache License 2.0 |
1)Start 'Zookeeper' server. 2)Start 'Kafka' server. 3)Start producer using 'rkafka.createProducer' function. 4)Send messages using 'rkafka.send' function. 5)Close producer using 'rkafka.closeProducer' function. 6)Start consumer using 'rkafka.createConsumer' function. 7)Read messages using 'rkafka.read' function. 8)Close consumer using 'rkafka.closeConsumer' function.
Shruti Gupta
Maintainer: Who to complain to shrutigupta34@gmail.com
To understand 'Kafka' https://kafka.apache.org/documentation.html
## Not run: prod1=rkafka.createProducer("127.0.0.1:9092") rkafka.send(prod1,"test","127.0.0.1:9092","Testing once") rkafka.send(prod1,"test","127.0.0.1:9092","Testing twice") rkafka.send(prod1,"test","127.0.0.1:9092","Testing thrice") rkafka.closeProducer(prod1) consumer1=rkafka.createConsumer("127.0.0.1:2181","test") print(rkafka.read(consumer1)) print(rkafka.read(consumer1)) print(rkafka.read(consumer1)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.