{"id":36850481,"url":"https://github.com/stn1slv/meetup-schema-registry","last_synced_at":"2026-01-12T14:37:10.591Z","repository":{"id":64832788,"uuid":"539466922","full_name":"stn1slv/meetup-schema-registry","owner":"stn1slv","description":"Sources for Schema Registry meetup","archived":false,"fork":false,"pushed_at":"2023-06-26T17:15:05.000Z","size":6825,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T03:47:45.152Z","etag":null,"topics":["apicurio","json-schema","kafka","validation","xml-schema"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stn1slv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-21T12:04:29.000Z","updated_at":"2025-09-01T14:22:30.000Z","dependencies_parsed_at":"2025-04-22T12:58:31.861Z","dependency_job_id":"80472b24-bae5-4661-b7d1-6fd0ec2fd658","html_url":"https://github.com/stn1slv/meetup-schema-registry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stn1slv/meetup-schema-registry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stn1slv%2Fmeetup-schema-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stn1slv%2Fmeetup-schema-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stn1slv%2Fmeetup-schema-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stn1slv%2Fmeetup-schema-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stn1slv","download_url":"https://codeload.github.com/stn1slv/meetup-schema-registry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stn1slv%2Fmeetup-schema-registry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28052420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apicurio","json-schema","kafka","validation","xml-schema"],"created_at":"2026-01-12T14:37:09.971Z","updated_at":"2026-01-12T14:37:10.577Z","avatar_url":"https://github.com/stn1slv.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Schema Registry Demo\nThe [recording](https://youtu.be/9aql6xu8kRc) and [slides](slides.pdf) from the meetup.\n\n![Demo case](.img/SchemaRegistryDemo-dark.svg#gh-dark-mode-only)\n![Demo case](.img/SchemaRegistryDemo-light.svg#gh-light-mode-only)\n\n## Preparing\nYou have to add some entries to your ```/etc/hosts``` file:\n```\n127.0.0.1            keycloak\n127.0.0.1            kafka\n127.0.0.1            schema-registry\n```\nThat's needed for host resolution because Kafka brokers and Kafka clients connecting to Keycloak have to use the same hostname to ensure the compatibility of generated access tokens. Also, when Kafka client connects to Kafka broker running inside docker image, the broker will redirect the client to ```kafka:9092```.\n\n\n\nPreparing local environment:\n\u003cdetails\u003e\u003csummary\u003eMacOS\u003c/summary\u003e\n\nRequired software:\n- Docker engine \u0026 docker compose (Docker Desktop for Mac or [Rancher Desktop](https://github.com/rancher-sandbox/rancher-desktop/))\n- [Git](https://github.com/git/git)\n- [Apache Maven](https://github.com/apache/maven)\n- [httpie](https://github.com/httpie/httpie) (or any other http client)\n- [kcat](https://github.com/edenhill/kcat) (or any other kafka client)\n\nYou can install using following command:\n```\nbrew install git httpie kcat maven\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eLinux\u003c/summary\u003e\n\nRequired software:\n- Docker engine \u0026 docker compose\n- [Git](https://github.com/git/git)\n- [Apache Maven](https://github.com/apache/maven)\n- [httpie](https://github.com/httpie/httpie) (or any other http client)\n- [kcat](https://github.com/edenhill/kcat) (or any other kafka client)\n\nOn Ubuntu you can install last three tools using the following command:\n```\nsudo apt update \u0026\u0026 sudo apt install git httpie kafkacat maven -y\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eWindows\u003c/summary\u003e\n\nRequired software:\n- Docker Desktop for Windows\n- [Git](https://git-scm.com/download/win) \n- [Apache Maven](https://github.com/apache/maven)\n- Windows Subsystem for Linux (for httpie and kcat/kafkacat)\n\u003c/details\u003e\n\n## Start environment\n1. Clone this repository\n```\ngit clone https://github.com/stn1slv/meetup-schema-registry\n```\n2. Use root directory of the repo\n```\ncd meetup-schema-registry\n```\n3. Cleanup\n```\ndocker rm keycloak kafka zookeeper schema-registry sr-init kc-init\n```\n4. Start KeyCloak, Apicurio Registry and Kafka\n```\ndocker-compose up\n```\n\n## Start demo applications\n1. Start ServerA app\n```\nmvn clean spring-boot:run -f ServerA/pom.xml\n```\n2. Start ServerB app\n```\nmvn clean spring-boot:run -f ServerB/pom.xml\n```\n\n## Testing\n#### JSON Schema\n###### Send JSON message via http endpoint\n\n\u003cdetails\u003e\u003csummary\u003eSuccessful case\u003c/summary\u003e\n\nJohn made a purchase of item 20223 for Jane:\n```\ncat examples/purchaseOrderV1_Alice.json | http POST 'http://localhost:8085/doSomething' Content-Type:'application/json'\n```\nAlice sent a present to Bob:\n```\ncat examples/purchaseOrderV1_John.json | http POST 'http://localhost:8085/doSomething' Content-Type:'application/json'\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eFailed case\u003c/summary\u003e\n\nJohn made a purchase of item 20223 for Jane:\n```\ncat examples/purchaseOrderV1_Alice-invalid.json | http POST 'http://localhost:8085/doSomething' Content-Type:'application/json'\n```\nAlice sent a present to Bob:\n```\ncat examples/purchaseOrderV1_John-invalid.json | http POST 'http://localhost:8085/doSomething' Content-Type:'application/json'\n```\n\u003c/details\u003e\n\n#### XML Schema\n###### Send XML message to Input topic in Kafka\n\n\u003cdetails\u003e\u003csummary\u003eSuccessful case\u003c/summary\u003e\n\n###### Send messages\nJohn made a purchase of item 20223 for Jane:\n```\nkcat -P -b 127.0.0.1 -t input examples/purchaseOrderV1_Alice.xml\n```\nAlice sent a present to Bob:\n```\nkcat -P -b 127.0.0.1 -t input examples/purchaseOrderV1_John.xml\n```\n###### Monitor messages in Output topic\nIn case of successful validation the message will be moved to output topic:\n```\nkcat -b 127.0.0.1 -t output\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eFailed case\u003c/summary\u003e\n\n###### Send messages\nJohn made a purchase of item 20223 for Jane:\n```\nkcat -P -b 127.0.0.1 -t input examples/purchaseOrderV1_Alice-invalid.xml\n```\nAlice sent a present to Bob:\n```\nkcat -P -b 127.0.0.1 -t input examples/purchaseOrderV1_John-invalid.xml\n```\n###### Monitor messages in DLQ topic\nIn case of validation failure the message will be moved  to dlq topic:\n```\nkcat -C -b 127.0.0.1 -t dlq -f '\\nKey: %k\\t\\nHeaders: %h \\t\\nValue: %s\\\\n--\\n'\n```\n\u003c/details\u003e\n\n## URLs\n#### Apicurio Registry\nEndpoint: http://keycloak:8180/ui/artifacts\n\n###### Users\n| Username | Password | Role         |\n| -------- | -------- | ------------ |\n| jcooper  | jcooper  | sr-admin     |\n| fkafka   | fkafka   | sr-developer |\n| cdickens | cdickens | sr-readonly  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstn1slv%2Fmeetup-schema-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstn1slv%2Fmeetup-schema-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstn1slv%2Fmeetup-schema-registry/lists"}