Comments (5)
Hi,
Thanks for reaching out!
We do provide the ability to specify implementation of AwsCredentialsProvider
as seen here and here for GlueSchemaRegistryKafkaSerializer
.
Let me know if you have more questions.
from aws-glue-schema-registry.
Thanks for getting back @vanessapinto257 . Yes, I saw that and I utilise this constructor as shown above in the code snippet. The thing is that the the producer configuration only takes the class name of the Serialiser and not the object.
producerProperties.put( ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, GlueSchemaRegistryKafkaSerializer.class.getName());
And the kafka Library uses the default constructor to create the serialiser.
/**
* Constructor used by Kafka producer when passing as the property.
*/
public GlueSchemaRegistryKafkaSerializer() {
this(DefaultCredentialsProvider.builder()
.build(), null, null);
}
This constructor when invoked call another constructor which initialises the AwsCredentialsProvider
to DefaultCredentialsProvider
.
public GlueSchemaRegistryKafkaSerializer(AwsCredentialsProvider credentialProvider,
UUID schemaVersionId,
Map<String, ?> configs) {
this.credentialProvider = (credentialProvider == null) ? DefaultCredentialsProvider.builder()
.build() : credentialProvider;
this.schemaVersionId = schemaVersionId;
if (configs != null) {
configure(configs, false);
}
}
I am looking for a way to specify the AwsCredentialsProvider
without having to extend the GlueSchemaRegistryKafkaSerializer
as I did . The code snippet is there on my question.
Regards
Dheeraj Rampal
from aws-glue-schema-registry.
Have you tried initializing your producer with serializers as arguments as show in the Kafka documentation?
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("transactional.id", "my-transactional-id");
Producer<String, String> producer = new KafkaProducer<>(props, new StringSerializer(), new GlueSchemaRegistryKafkaSerializer(credentialProvider, configs));
from aws-glue-schema-registry.
Thanks for getting back. This will definitely work. However I am using spring-kafka which provides kafka-template
, which can be initialised by providing an instance of ProducerFactory
. At this moment I am occupied with some other assignment. I will try to find some time and do something similar to what you suggested with the ProducerFactory
. I will get back to you.
from aws-glue-schema-registry.
Thank you! Please feel free to re-open if you run into issues trying it.
from aws-glue-schema-registry.
Related Issues (20)
- schema-registry-serde:1.1.17 transient dependency org.json:json:jar:20230227 CVE-2023-5072 HOT 3
- Please update aws sdk v2 version. schema-registry-serde:1.1.17 conflicts with latest aws-sdk libs. HOT 2
- Allow customization of ObjectMapper / registration of default modules missing HOT 1
- `NoSuchMethodError` from `GlueSchemaRegistryDeserializerDataParser` when running on JDK 8 HOT 2
- JsonDeserializer does not allow enabling/disabling a feature for Jackson Object Mapper HOT 4
- Avro deserialization fails in 1.1.18 HOT 3
- ProtobufSchemaConverter fails in v1.1.18 HOT 1
- Vulnerability CVE-2024-21634 (High Severity) HOT 1
- AWS MSK and AWS Glue Schema Registry Configuration is Wrong
- v1.1.17 to v1.1.19 fails producing messages with error "java.lang.NoSuchFieldError: IDENTITY_PROVIDERS" on SelfManaged Kafka server with no authentication HOT 2
- Production of AVRO specific record seems to be creating a Generic Record - v1.1.19/Lambda/Java 17 - Protobuf reading a typed record doesn´t find the class to map to
- Can't enable BACKWARD_COMPATIBILTY mode in the s3 sink connector HOT 1
- New constructor for AWSSchemaRegistryClient request
- Test `GlueSchemaRegistryConfigurationTest.testBuildConfig_noRegionConfigsSupplied_throwsException` fails in some build scenarios but not others HOT 1
- Serialization errors when using JSON messages on MSK Connect together with GSR Confluent JDBC Sink
- Nested Protobuf Message with oneof fails to convert
- Question: Why is kafka streams caching disabled in the README.md kafka streams example?
- New release with updated kafka.scala.version HOT 1
- Kafka Connect with kafka-connect-s3 plugin getting error Can't redefine: com.amazonaws.services.schemaregistry.kafkaconnect.avrodata.Union HOT 2
- Unnecessary dependency on jimfs?
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 aws-glue-schema-registry.