-
Notifications
You must be signed in to change notification settings - Fork 849
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
WIP - Do not Merge: Added support for AWS Glue Schema registry #488
base: master
Are you sure you want to change the base?
Conversation
Thank you @nicklester ! |
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.
I've added a few small comments.
I agree with @davideicardi that a bit more isolation and genericity would be helpful.
What about this:
- Add a property
schemaregistry.type
, with possible valuesgeneric
andaws-glue
. Default isgeneric
. - Extend
SchemaRegistryProperties
with a check: iftype != 'generic'
, then the propertiesconnect
andauth
should not be set. - Enhance
GlueSchemaRegistryProperties
in a similar way and removeisConfigured
. Als add a validation that the mandatory properties are set if this registry type is configured. - Extend
AvroMessageDeserializer
with a map of deserializer factories, keyed by the registry type.
With that, we're prepared for a future PR that adds support for Microsoft's SchemaRegistryApacheAvroSerializer
this.kafkaMonitor = kafkaMonitor; | ||
this.messageInspector = messageInspector; | ||
this.messageFormatProperties = messageFormatProperties; | ||
this.schemaRegistryProperties = schemaRegistryProperties; | ||
this.protobufProperties = protobufProperties; | ||
this.glueSchemaRegistryProperties = glueSchemaRegistryProperties; |
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.
Move this one down, to maintain the same order as the parameter list
@@ -60,6 +60,12 @@ and if you also require basic auth for your schema registry connection you shoul | |||
--schemaregistry.auth=username:password | |||
``` | |||
|
|||
or, if you are using the AWS Glue Schema Registry | |||
``` | |||
--schemaregistry.glue.region=us-east-1 --schemaregistry.glue.registryName=demo-registry |
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.
--schemaregistry.glue.region=us-east-1 --schemaregistry.glue.registryName=demo-registry | |
--schemaregistry.glue.region=us-east-1 | |
--schemaregistry.glue.registryName=demo-registry |
Besides this, also document the other (apparently optional) properties.
if(StringUtils.isNotEmpty(awsEndpoint)) | ||
config.put(AWSSchemaRegistryConstants.AWS_ENDPOINT, awsEndpoint); |
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.
if(StringUtils.isNotEmpty(awsEndpoint)) | |
config.put(AWSSchemaRegistryConstants.AWS_ENDPOINT, awsEndpoint); | |
if (StringUtils.isNotEmpty(awsEndpoint)) { | |
config.put(AWSSchemaRegistryConstants.AWS_ENDPOINT, awsEndpoint); | |
} |
We'll need to establish and publish a code style, but from what I see, curly braces are used around all blocks.
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.
good suggestiosn - sorry slow response. Busy work wise. Will take a look shortly
Was just a quick question - (as Java is not my 1st or even 2nd language!). Isn't using a factory going to mean we need to pass the same types as arguments, but the generic and glue configs are different, and in different hierarchies). Apologies if I've missed something obvious :) |
No problem! As always, there are multiple ways to approach it. I'd do a slightly bigger refactor as you find in |
Added support to enable the AWS Glue Schema Registry