module-ballerinax-kafka
module-ballerinax-kafka copied to clipboard
Use `cregistry:ConnectionConfig` type for the schemaRegistryConfig field
Purpose
This is part of the revamping process of the schema registry client: https://github.com/ballerina-platform/ballerina-library/issues/8401
Sample Configuration for kafka:Producer
kafka:ProducerConfiguration config = {
keySerializerType: kafka:SER_AVRO,
valueSerializerType: kafka:SER_AVRO,
keySchema: keySchema,
valueSchema: schema,
schemaRegistryConfig: {
baseUrl: "https://psrc-8kz20.us-east-2.aws.confluent.cloud",
auth: {
apiKey: "MIWUTPVXA5TDX2NI",
apiSecret: "D4FGQq7Wqucjbg9c5zGMmqY+sN9g0N2cuZKlvHvow59vMGcUZiqnIkiEEEV+Q08o"
}
}
};
Sample Configuration for kafka:Consumer
kafka:ConsumerConfiguration consumerConfiguration = {
topics: "order",
offsetReset: kafka:OFFSET_RESET_EARLIEST,
groupId: "consumer-sasl-scram-256-test-group",
keyDeserializerType = "DES_AVRO"
valueDeserializerType = "DES_AVRO"
schemaRegistryConfig: {
baseUrl: "https://psrc-8kz20.us-east-2.aws.confluent.cloud",
auth: {
apiKey: "MIWUTPVXA5TDX2NI",
apiSecret: "D4FGQq7Wqucjbg9c5zGMmqY+sN9g0N2cuZKlvHvow59vMGcUZiqnIkiEEEV+Q08o"
}
}
};
Codecov Report
:x: Patch coverage is 68.18182% with 7 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 81.68%. Comparing base (eb48260) to head (03994af).
:warning: Report is 1 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ballerina/listener.bal | 33.33% | 4 Missing :warning: |
| ballerina/producer.bal | 77.77% | 2 Missing :warning: |
| ballerina/consumer.bal | 83.33% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1272 +/- ##
============================================
+ Coverage 81.65% 81.68% +0.02%
- Complexity 502 503 +1
============================================
Files 47 47
Lines 2562 2571 +9
Branches 385 391 +6
============================================
+ Hits 2092 2100 +8
- Misses 310 312 +2
+ Partials 160 159 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@Nuvindu better to link this to a gitissue and update the changelog. Also lets add a sample code for this PR.