[ 
https://issues.apache.org/jira/browse/KAFKA-689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13548646#comment-13548646
 ] 

Jay Kreps commented on KAFKA-689:
---------------------------------

Well I guess what I am saying is that getting metadata is not intuitively at 
all related to creating topics. I had noticed this code before but hadn't 
really thought about it. I assume the reason for this is because to make a 
correct produce request you have to know the host so the old strategy of doing 
auto-create on produce doesn't work in 0.8.

I think there are two sensible strategies for auto-create:
1. Auto create on produce. This is tricky because you have to somehow ensure 
that the local node would hold the partitions used (and how did the client come 
up with those partitions anyway?)
2. Add a public api for creating topics and make the client implement auto 
create client-side

I would favor (2).

There is no harm in the current scheme as long as people are warned that we 
intend to change it.
                
> Can't append to a topic/partition that does not already exist
> -------------------------------------------------------------
>
>                 Key: KAFKA-689
>                 URL: https://issues.apache.org/jira/browse/KAFKA-689
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.8
>            Reporter: David Arthur
>         Attachments: kafka.log, produce-payload.bin
>
>
> With a totally fresh Kafka (empty logs dir and empty ZK), if I send a 
> ProduceRequest for a new topic, Kafka responds with 
> "kafka.common.UnknownTopicOrPartitionException: Topic test partition 0 
> doesn't exist on 0". This is when sending a ProduceRequest over the network 
> (from Python, in this case).
> If I use the console producer it works fine (topic and partition get 
> created). If I then send the same payload from before over the network, it 
> works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to