-
Notifications
You must be signed in to change notification settings - Fork 75
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
Upgrade the Kafka Library to 1.4.3 #151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would advice to release as a beta and ask people to give a try.
src/Microsoft.Azure.WebJobs.Extensions.Kafka/Serialization/LocalSchemaRegistry.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Azure.WebJobs.Extensions.Kafka/Serialization/LocalSchemaRegistry.cs
Show resolved
Hide resolved
src/Microsoft.Azure.WebJobs.Extensions.Kafka/Serialization/LocalSchemaRegistry.cs
Show resolved
Hide resolved
If proto buff is part of the library does it mean that we can drop the usage of Google.Protobuf? |
Confluent.SchemaRegistry.Serdes.Protobuf
src/Microsoft.Azure.WebJobs.Extensions.Kafka/Serialization/LocalSchemaRegistry.cs
Show resolved
Hide resolved
@ahmelsayed / @anirudhgarg can we get a review on this please. LGTM and @fbeltrao. this is related to issue #157 regarding CA certs, so if we can get this change in, then we might avoid having to fix that one. |
Hi @fbeltrao Without this implementation, the E2E testing fails at least. |
Sorry @ryancrawcour |
@TsuyoshiUshio , looking at Confluent library they seem to have helpers to define names for keys and values. public class LocalSchemaRegistry : ISchemaRegistryClient
{
private readonly string schema;
private readonly SubjectNameStrategyDelegate keyNameStrategy;
private readonly SubjectNameStrategyDelegate valueNameStrategy;
private readonly List<string> subjects = new List<string>();
public LocalSchemaRegistry(string schema, SubjectNameStrategy valueNameStrategy = SubjectNameStrategy.Topic, SubjectNameStrategy keyNameStrategy = SubjectNameStrategy.Topic)
{
this.keyNameStrategy = keyNameStrategy.ToDelegate();
this.valueNameStrategy = valueNameStrategy.ToDelegate();
this.schema = schema;
}
<other members removed for simplicity>
public Task<int> RegisterSchemaAsync(string subject, string schema) => Task.FromResult(1);
public Task<int> RegisterSchemaAsync(string subject, Schema schema) => Task.FromResult(1);
} The purpose of the LocalSchemaRegistry is to enables a scenario to use Avro without a schema registry. More work is needed to actually support an schema registry. |
@TsuyoshiUshio if you're separating that work in to a new issue, is this one complete & ready? or still busy with it? |
@ryancrawcour This version works. As the same level as the last version. I mean ready. The proposal from the @fbeltrao is good one however, not directly related to the version update. So that we decide to go with separate PR. |
I update the Kafka Library to 1.4.3.
It includes big change on the SchemaRegistry.
https://github.com/confluentinc/confluent-kafka-dotnet/releases
Outcome
The New library includes several fix.
What I did
They change the Package responsibility at JSON and Protobuf serdes including integration with Schema Registry
For more details, please refer to References
For reviewers
Since the ISchemaRegistryClient interface has been changed, I don't have 100% confidence for this change. It is call back interface so we don't directory reference it. I confirmed all the Unit/E2E test works on my local machine. The implementation of the LocalSchemaRegistry can be the biggest review point.
I'm wondering if I includes this fix to the GA version. People want
GA
that means official support. I can publish the current version as GA and upgrade it after that. That is all tested, however, if we could have this version as a GA, it might be great.