rkafka-package: Using Apache 'Kafka' Messaging Queue Through 'R'

Description Details Author(s) References Examples

Description

It provides functionalities of creating a 'Kafka' producer, simple consumer,high level consumer and sending and receiving messages.

Details

Package: rkafka
Type: Package
Version: 1.1
Date: 2017-06-28
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.

Author(s)

Shruti Gupta

Maintainer: Who to complain to shrutigupta34@gmail.com

References

To understand 'Kafka' kafka.apache.org/documentation.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

shrutigupta23/rkafka documentation built on May 29, 2019, 9:36 a.m.