Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin.ListTopics() returns unexpected config entries #1514

Closed
ZoltanOnody opened this issue Oct 18, 2019 · 3 comments
Closed

admin.ListTopics() returns unexpected config entries #1514

ZoltanOnody opened this issue Oct 18, 2019 · 3 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@ZoltanOnody
Copy link

Versions
Sarama Kafka Go
1.24.0 2.1.1 1.12.7
Problem Description

I'm trying to desribe a topic using sarama but it gives me unexpected results.

When I run:

/opt/kafka/bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic test2GD6-operations-imf-GD6-E

I get the following response:

Topic:test2GD6-operations-imf-GD6-E PartitionCount:4 ReplicationFactor:3 Configs:retention.ms=604800000,min.insync.replicas=2
   ... <list of topics>

So it shows me that the config is retention.ms=604800000,min.insync.replicas=2 which is, in fact, correct.

However, when I try to describe the same config using sarama, I get different results. Running:

topics, _ := admin.ListTopics()
topic, _ := topics["test2GD6-operations-imf-GD6-E"]
p, _ := json.Marshal(topic.ConfigEntries)
fmt.Println(string(p))

Returns:

{
  "message.format.version":"2.1-IV2",
  "min.insync.replicas":"2",
  "retention.ms":"604800000",
  "segment.bytes":"1073741824"
}

It seems to me, that sarama is returning some default config options. I don't think that is expected as in [email protected]/admin.go:291 I see:

// only include non-default non-sensitive config
// (don't actually think topic config will ever be sensitive)
if entry.Default || entry.Sensitive {
    continue
}
topicDetails.ConfigEntries[entry.Name] = &entry.Value
@ghost
Copy link

ghost commented Feb 21, 2020

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@ghost ghost added the stale Issues and pull requests without any recent activity label Feb 21, 2020
@ghost ghost closed this as completed Mar 22, 2020
@d1egoaz d1egoaz reopened this Oct 13, 2020
@ghost ghost removed the stale Issues and pull requests without any recent activity label Oct 13, 2020
@d1egoaz
Copy link
Contributor

d1egoaz commented Oct 13, 2020

It looks like expectation was changed here: #1514

@ghost
Copy link

ghost commented Mar 16, 2021

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the master branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@ghost ghost added the stale Issues and pull requests without any recent activity label Mar 16, 2021
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants