Learn R Programming

rkafka (version 1.4)

rkafka.closeSimpleConsumer: Closing KAKFA Simple consumer

Description

This functions shuts down the KAFKA Simple consumer

Usage

rkafka.closeSimpleConsumer(SimpleConsumer)

Value

Function doesn't return anything

Arguments

SimpleConsumer

SimpleConsumer:SimpleConsumer that has to be shut down Required:Mandatory Type:SimpleConsumer

Author

Shruti Gupta

Details

There are two types of KAFKA consumers:High-Level and Simple.This function shuts down the KAFKA Simple Consumer

References

To know when to use simple consumer and when to use High-level Consumer, refer the url below: https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example

Examples

Run this code
if (FALSE) {
consumer1=rkafka.createSimpleConsumer("172.25.1.78","9092","10000","100000","test")
rkafka.receiveFromSimpleConsumer(consumer1,"test","0","0","test-group")
print(rkafka.readFromSimpleConsumer(consumer1))
rkafka.closeSimpleConsumer(consumer1)
}

Run the code above in your browser using DataLab