Skip to content

Commit

Permalink
Remove spurious topic/partitions existence test when producing. (#655)
Browse files Browse the repository at this point in the history
The Producer will throw an exception if the topic/partition does not exist, and the exception is mapped.

Having the produce-to-topic use the AdminClient actually breaks confluent-security-plugins. This is a short-term solution.
  • Loading branch information
rigelbm committed Apr 24, 2020
1 parent 4eca2af commit 8d15c79
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -194,14 +194,7 @@ protected <K, V> void produce(
final int partition,
final EmbeddedFormat format,
final ProduceRequest<K, V> request
) throws Exception {
// If the topic already exists, we can proactively check for the partition
if (topicExists(topic)) {
if (!ctx.getAdminClientWrapper().partitionExists(topic, partition)) {
throw Errors.partitionNotFoundException();
}
}

) {
log.trace(
"Executing topic produce request id={} topic={} partition={} format={} request={}",
asyncResponse, topic, partition, format, request
Expand Down

0 comments on commit 8d15c79

Please sign in to comment.