Skip to content
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

Using catalog::apicurio triggers unexpected behaviour #1202

Closed
ankitk-me opened this issue Aug 15, 2024 · 0 comments · Fixed by #1204
Closed

Using catalog::apicurio triggers unexpected behaviour #1202

ankitk-me opened this issue Aug 15, 2024 · 0 comments · Fixed by #1204
Assignees
Labels
bug Something isn't working

Comments

@ankitk-me
Copy link
Contributor

ankitk-me commented Aug 15, 2024

Describe the bug
When using catalog::apicurio with binding::asyncapi, I was able to successfully produce a valid message to Kafka topic. Able to validate that based on response code: 204 & by consuming kafka topic using a third party client.

But in the Zilla log, observed mentioned log line:

1723729278272:zilla-http-kafka-asyncapi:south_kafka_client/kafka_api kafka_client0: Skipping invalid message on topic petstore-pets, partition 0, offset 0

This log is triggered during fetch, if the message fails validation.

While debugging further, below are my findings:

  • We always encode schemaId during produce as int32 (4 bytes), but while consuming by default we decode 8 bytes to determine schema Id. We should make this consistent by either encoding schemaId as 8 bytes or by default decode 4 bytes for schema Id.

  • I tried resolving this issue by setting "id-encoding" to "legacy", in catalog config but still same issue persisted.

  • To validate my findings, I hard coded this.encodeId = this::encodeDefaultId; to use default encoding strategy and the issue was resolved.

To Reproduce
Steps to reproduce the behavior:

  1. Start an asyncapi-http-kafka example with apicurio catalog.
catalogs:
  apicurio_catalog:
    type: "apicurio"
    options:
      url: "http://apicurio.zillabase.dev:8080"
      group-id: "default"
  1. Produce a valid message to Kafka topic.
  2. See error Skipping invalid message on topic in Zilla log.

Expected behavior
On fetch, we should receive valid event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants