2,827 questions
72
votes
6
answers
120k
views
Connect to Kafka running in a Docker container
I setup a single node Kafka Docker container on my local machine like it is described in the Confluent documentation (steps 2-3).
In addition, I also exposed Zookeeper's port 2181 and Kafka's port ...
34
votes
10
answers
42k
views
Integrating Spark Structured Streaming with the Confluent Schema Registry
I'm using a Kafka Source in Spark Structured Streaming to receive Confluent encoded Avro records. I intend to use Confluent Schema Registry, but the integration with spark structured streaming seems ...
196
votes
11
answers
333k
views
How can I send large messages with Kafka (over 15MB)?
I send String-messages to Kafka V. 0.8 with the Java Producer API.
If the message size is about 15 MB I get a MessageSizeTooLargeException.
I have tried to set message.max.bytesto 40 MB, but I still ...
41
votes
9
answers
103k
views
How to install Kafka on Windows?
I'm trying to install Kafka message queue on Windows for testing purposes (not for production).
I found this article on how to install Apache Kafka 0.8 on Windows: http://janschulte.wordpress.com/...
44
votes
3
answers
26k
views
How to send final kafka-streams aggregation result of a time windowed KTable?
What I'd like to do is this:
Consume records from a numbers topic (Long's)
Aggregate (count) the values for each 5 sec window
Send the FINAL aggregation result to another topic
My code looks like ...
47
votes
6
answers
52k
views
How to create a Topic in Kafka through Java
I want to create a topic in Kafka (kafka_2.8.0-0.8.1.1) through java. It is working fine if I create a topic in command prompt, and If I push message through java api. But I want to create a topic ...
10
votes
2
answers
53k
views
Streamparse wordcount example
I have been wanting to use Apache Storm to stream from Kafka. I am more comfortable with Python, so I decided to use streamparse (https://github.com/Parsely/streamparse). The word count example is the ...
327
votes
7
answers
109k
views
Using Kafka as a (CQRS) Eventstore. Good idea?
Although I've come across Kafka before, I just recently realized Kafka may perhaps be used as (the basis of) a CQRS, eventstore.
One of the main points that Kafka supports:
Event capturing/storing, ...
136
votes
1
answer
151k
views
Difference between session.timeout.ms and max.poll.interval.ms for Kafka >= 0.10.1
I am unclear why we need both session.timeout.ms and max.poll.interval.ms and when would we use one or the other or both? It seems like both settings indicate the upper bound on the time the ...
55
votes
11
answers
62k
views
How Can we create a topic in Kafka from the IDE using API
How Can we create a topic in Kafka from the IDE using API because when I do this:
bin/kafka-create-topic.sh --topic mytopic --replica 3 --zookeeper localhost:2181
I get the error:
bash: bin/kafka-...
53
votes
1
answer
40k
views
SyntaxError on "self.async" when running python kafka producer
Traceback (most recent call last):
File "//producer.py", line 1, in <module>
from kafka.producer import KafkaProducer
File "/usr/local/lib/python3.9/site-packages/kafka/...
270
votes
27
answers
380k
views
Is there a way to purge the topic in Kafka?
I pushed a message that was too big into a kafka message topic on my local machine, now I'm getting an error:
kafka.common.InvalidMessageSizeException: invalid message size
Increasing the fetch.size ...
286
votes
3
answers
202k
views
What determines Kafka consumer offset?
I am relatively new to Kafka. I have done a bit of experimenting with it, but a few things are unclear to me regarding consumer offset. From what I have understood so far, when a consumer starts, the ...
40
votes
5
answers
32k
views
Kafka how to read from __consumer_offsets topic
I'm trying to find out which offsets my current High-Level consumers are working off. I use Kafka 0.8.2.1, with no "offset.storage" set in the server.properties of Kafka - which, I think, means that ...
15
votes
1
answer
13k
views
How to read records in JSON format from Kafka using Structured Streaming?
I am trying to use structured streaming approach using Spark-Streaming based on DataFrame/Dataset API to load a stream of data from Kafka.
I use:
Spark 2.10
Kafka 0.10
spark-sql-kafka-0-10
Spark ...