You need to read the Kafka design docs. Kafka does not delete messages just 
because a Consumer reads it. It does not track what messages have been consumed 
by any Consumer. 

It is up to Consumers to start off where they left off, by always asking for 
the right message (via offsets). 

Philip

On Feb 16, 2013, at 4:48 AM, David Montgomery <davidmontgom...@gmail.com> wrote:

> Hi,
> 
> I have a zookeer and kafka set up.
> 
> I am using this python client:  https://github.com/mumrah/kafka-python
> 
> I can send and receive messages but they are not deleted.
> 
> How can I send a message to kafka and no other consumer can use it?
> 
> 
> I feel I am missing something on how kafka works
> 
> def produce():
>    kafka = KafkaClient("xxx.xxx", 9092)
>    kafka.send_messages_simple("my-topic", "some message")
>    kafka.close()
>    print 'done'
> 
> def consume():
>    kafka = KafkaClient("xxx.xxx", 9092)
>    for msg in kafka.iter_messages("my-topic", 0, 0, 1024*1024,False):
>        print(msg.payload)
>    kafka.close()
>    print 'done'
> 
> Every time I ran the above...everytime I ran consume the messages just grew
> from previous messages.
> 
> Am I missing something on the server.properties file?
> 
> Thanks

Reply via email to