rkafka.readFromSimpleConsumer: KAFKA Simple Consumer Reading

Description Usage Arguments Details Value Note Author(s) References Examples

Description

This function returns one message at a time which are read by a KAFKA Simple Consumer

Usage

1

Arguments

SimpleConsumerObj

Consumer through which messages were received Required:Mandatory Type:Consumer

Details

There are two types of KAFKA consumers:High-Level and Simple. This function receives messages using the Simple Consumer. Use caution on deciding to use the Simple Consumer as it doesn't persist offset.The function rkafka.receiveFromSimpleConsumer needs to be executed before running this function

Value

String

Note

Warning:The function rkafka.receiveFromSimpleConsumer needs to be executed before running this function

Author(s)

Shruti Gupta

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

1
2
3
4
5
6
## Not run: 
consumer1=rkafka.createSimpleConsumer("172.25.1.78","9092","10000","100000","test")
rkafka.receiveFromSimpleConsumer(consumer1,"test","0","0","test-group")
print(rkafka.readFromSimpleConsumer(consumer1))

## End(Not run)

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