Description Usage Arguments Examples
View source: R/kafka_dataset.R
Creates a KafkaDataset.
| 1 2 3 4 5 6 7 | kafka_dataset(
  topics,
  servers = "localhost",
  group = "",
  eof = FALSE,
  timeout = 1000
)
 | 
| topics | A  | 
| servers | A list of bootstrap servers. | 
| group | The consumer group id. | 
| eof | If True, the kafka reader will stop on EOF. | 
| timeout | The timeout value for the Kafka Consumer to wait (in millisecond). | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run: 
dataset <- kafka_dataset(
    topics = list("test:0:0:4"), group = "test", eof = TRUE) %>%
  dataset_repeat(1)
sess <- tf$Session()
iterator <- make_iterator_one_shot(dataset)
next_batch <- iterator_get_next(iterator)
until_out_of_range({
  batch <- sess$run(next_batch)
  print(batch)
})
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.