Skip to content

Implement YANG Kafka Integration - #11

Open
Deepya1502 wants to merge 1 commit into
network-analytics:mainfrom
Deepya1502:yang-push-consumer-uaa
Open

Implement YANG Kafka Integration#11
Deepya1502 wants to merge 1 commit into
network-analytics:mainfrom
Deepya1502:yang-push-consumer-uaa

Conversation

@Deepya1502

Copy link
Copy Markdown

This PR implements the YANG Kafka integration as requested.

id = ByteBuffer.wrap(serializedSchemaId).getInt();
} else {
id = Integer.parseInt(new String(serializedSchemaId, StandardCharsets.UTF_8));
}

@cuihengch cuihengch May 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the updates, if we fix it here (in json deserializer), it would be great also to do so in cbor part (e.g. please refer to here) just to keep consistency..

return null;
} catch (RestClientException e) {
throw toKafkaException(e, "Error retrieving YANG schema for id " + id);
log.error("Error retrieving YANG schema for id {}: {}", id, e.getMessage(), e);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

existing parts are throwing exceptions explicitly, and here we change everything into implicit logging and returning null.

from my view, it's ok to have such change temporarily while debug in local, however, it would be still elegant to remain as it is in the lib itself (i.e. keep the exception throwing out), so that no malformatted message (or any edge cases) will be missed out in application on top of it.

If you need to let your app continue next message without being broken, maybe also try things like try..catch.. in the app level (e.g. while polling a message from kafka, or consume directly kafka message as byte[] then call deserializer explitictly)

@cuihengch
cuihengch requested a review from graf3net May 26, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants