Learn R Programming

rkafka (version 1.4)

rkafka.createSimpleConsumer: Creating simple KAFKA consumer

Description

This function creates the Simple Consumer

Usage

rkafka.createSimpleConsumer(kafkaServerURL, 
kafkaServerPort, connectionTimeOut, 
kafkaProducerBufferSize, clientId)

Value

Doesn't return anything

Arguments

kafkaServerURL

kafkaServerPort

Port number of the KAFKA server Required:Mandatory Type:String

connectionTimeOut

Connection Timeout in ms Required:Mandatory Type:String

kafkaProducerBufferSize

Buffer size Required:Mandatory Type:String

clientId

ID of the client Required:Mandatory Type:String

Author

Shruti Gupta

Details

There are two types of KAFKA consumers:High-Level and Simple. This function creates the Simple Consumer. Use caution on deciding to use the Simple Consumer as it doesn't persist offset.

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")
}

Run the code above in your browser using DataLab