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

Help understanding how to use Avro references with Jackdaw #299

Open
cjbarre opened this issue Jul 20, 2021 · 1 comment
Open

Help understanding how to use Avro references with Jackdaw #299

cjbarre opened this issue Jul 20, 2021 · 1 comment

Comments

@cjbarre
Copy link

cjbarre commented Jul 20, 2021

Hello!

I have tried looking at all of the documentation available, but am still confused on this.

I have a command schema that uses an Avro reference in a Union to allow for a closed list of different commands to pass through this topic.

For example, the user.commands-value schema refers to the user.commands.register-user schema as an allowed value. Here's what the schema registry provides when I download the schema:

{
  "doc": "Schema for the user commands topic",
  "fields": [
    {
      "doc": "The particular command that has been sent.",
      "name": "command",
      "type": [
        "register_user"
      ]
    }
  ],
  "name": "value",
  "namespace": "user.commands",
  "type": "record"
}

With jackdaw I have no problem loading a schema that does not use a reference.

If I try to load this one that references another schema, then I get a parse error saying the name "register_user" is undefined.

I am trying to understand if jackdaw supports avro references, if so what do I need to do? If not, am I better off just using a union without references?

Thank you for working on jackdaw,

Cameron

@cjbarre
Copy link
Author

cjbarre commented Jul 28, 2021

@gphilipp can you point me in the right direction on this?

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

No branches or pull requests

1 participant