Comments (6)
There is, but it's a pretty big risk to have any fallback to the old AlterConfigsRequest
.
What you could do is to send ApiVersionsRequest
, pass the response to kversion.FromApiVersionsResponse
, and then check HasKey(<request key>)
.
If the response does not have the incremental key, then you could fallback to non-incremental.
The big risk is that AlterConfigs does not preserve any prior configuration, and even if you DescribeConfigs beforehand to try to preserve configuration, DescribeConfigs does not return secrets. Secrets cannot be preserved with AlterConfigs -- you may have seen this in the kcl repo where I have a prompt for configuration that will be lost.
from franz-go.
Thank you! I'll take a look at using ApiVersionsRequest
as you suggested.
I understand your explanation of the risk and I'll make sure it's clear to the user if my client is going to do something that might be destructive. 👍
from franz-go.
One other small risk is if your ApiVersions request goes to a new broker in a cluster that supports incremental update, while old brokers that do not are still in the cluster. This gets really tricky to solve correctly and IMO it's not worth it; Kafka authors have seen the problem here and are actually introducing a new "supported features" bit in MetadataResponse, but that's very new and they return nothing in it yet.
Happy to have helped, and happy you're checking out this library!
from franz-go.
One other small risk is if your ApiVersions request goes to a new broker in a cluster that supports incremental update, while old brokers that do not are still in the cluster.
In this situation, if the client chose to use incremental update and the request went to a broker that didn't support the feature, do you know off-hand what would happen? Would it return one of these errors, perhaps INVALID_REQUEST
?
from franz-go.
Kafka actually closes the connection, and the client has no knowledge of why. The client will retry, if it retries enough it should hit the broker that supported the request anyway. But, if you're trying to modify configs on the broker that doesn't support the request, the connection will be closed a bunch and then the client will hit the request retry limit.
from franz-go.
Um, sounds complicated. I can see why you think it's not worth it!
Thanks for the info. Very helpful.
from franz-go.
Related Issues (20)
- Confluent: Unable to create a topic due to policy violation HOT 3
- How to fetch zero records without waiting HOT 1
- GroupTransactSession Close hangs, preventing restart HOT 4
- Use EOS sessions with BlockRebalanceOnPoll HOT 3
- ProduceSync returning "context canceled" error when parent context hasn't been cancelled HOT 5
- Is there a way to limit consumer PollRecords buffered fetches by size? HOT 1
- Question: Why does kgo.StopProducerOnDataLossDetected() exist? HOT 2
- Incorrect documentation regarding sarama partitioner compatibility SaramaCompatHasher HOT 7
- Feature request: expose metadata to the user HOT 2
- Documentation request / question HOT 1
- RequestTimeoutOverhead appears to override Context cancellation HOT 5
- Broker Throttling
- Retry fetched records on handle error HOT 1
- github.com/twmb/franz-go/pkg/sr#Client.AllSchemas 404 not found HOT 3
- Deadlock in Produce() / TryProduce() when kgo.MaxBufferedBytes() is configured HOT 2
- Unable to specify LZ4 compression level HOT 3
- deadLock in produce HOT 2
- Error on kadm/UserSCRAMs calls with redpanda HOT 3
- Question: Is it safe to poll after receiving ErrGroupSession on poll when a broker node restarts in the cluster? HOT 1
- Data Race: concurrent access to recBatch.canFailFromLoadErrs during retry errors HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from franz-go.