- body='{"name": "my_consumer_instance", "format": "json", "auto.offset.reset": "earliest"}')
-fromJSON(content(response, "text"))
-
-response <- POST(url=paste(kafka_rest_proxy,
- "consumers",
- "my_json_consumer",
- "instances",
- "my_consumer_instance",
+ body=paste0('{"name": "',
+ consumer_instance,
+ '", "format": "json", "auto.offset.reset": "earliest"}')
+ )
+consumerDetails <- fromJSON(content(response, "text"))
+
+# Subscribe it to topic
+response <- POST(url=paste(consumerDetails$base_uri,