Delete topic in Kafka 0.8.1.1

Deleting topic isn’t always working in 0.8.1.1 Deletion should be working in the next release, 0.8.2 kafka-topics.sh –delete –zookeeper localhost:2181 –topic your_topic_name Topic your_topic_name is marked for deletion. Note: This will have no impact if delete.topic.enable is not set to true. You may also pass in a bootstrap server instead of zookeeper: kafka-topics.sh –bootstrap-server kafka:9092 … Read more

What’s the purpose of Kafka’s key/value pair-based messaging?

Kafka uses the abstraction of a distributed log that consists of partitions. Splitting a log into partitions allows to scale-out the system. Keys are used to determine the partition within a log to which a message get’s appended to. While the value is the actual payload of the message. The examples are actually not very … Read more

Kafka: Consumer API vs Streams API

Update January 2021: I wrote a four-part blog series on Kafka fundamentals that I’d recommend to read for questions like these. For this question in particular, take a look at part 3 on processing fundamentals. Update April 2018: Nowadays you can also use ksqlDB, the event streaming database for Kafka, to process your data in … Read more

Is key required as part of sending messages to Kafka?

Keys are mostly useful/necessary if you require strong order for a key and are developing something like a state machine. If you require that messages with the same key (for instance, a unique id) are always seen in the correct order, attaching a key to messages will ensure messages with the same key always go … Read more

Leader Not Available Kafka in Console Producer

It could be related to advertised.host.name setting in your server.properties. What could happen is that your producer is trying to find out who is the leader for a given partition, figures out its advertised.host.name and advertised.port and tries to connect. If these settings are not configured correctly it then may think that the leader is … Read more

Is there a way to purge the topic in Kafka?

Temporarily update the retention time on the topic to one second: kafka-topics.sh \ –zookeeper <zkhost>:2181 \ –alter \ –topic <topic name> \ –config retention.ms=1000 And in newer Kafka releases, you can also do it with kafka-configs –entity-type topics kafka-configs.sh \ –zookeeper <zkhost>:2181 \ –entity-type topics \ –alter \ –entity-name <topic name> \ –add-config retention.ms=1000 then … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)