{"id":47144400,"url":"https://github.com/quiqupltd/ktsllex","last_synced_at":"2026-03-12T23:08:43.857Z","repository":{"id":62429872,"uuid":"147820646","full_name":"quiqupltd/ktsllex","owner":"quiqupltd","description":"Elixir Kafka Topic and Schema creator","archived":false,"fork":false,"pushed_at":"2018-10-15T08:58:12.000Z","size":66,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-24T20:12:09.829Z","etag":null,"topics":["elixir","kafka","kafka-schema","kafka-topic"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quiqupltd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-07T12:31:47.000Z","updated_at":"2020-04-28T18:00:24.000Z","dependencies_parsed_at":"2022-11-01T20:07:21.065Z","dependency_job_id":null,"html_url":"https://github.com/quiqupltd/ktsllex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/quiqupltd/ktsllex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiqupltd%2Fktsllex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiqupltd%2Fktsllex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiqupltd%2Fktsllex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiqupltd%2Fktsllex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quiqupltd","download_url":"https://codeload.github.com/quiqupltd/ktsllex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quiqupltd%2Fktsllex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30448619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"ssl_error","status_checked_at":"2026-03-12T21:30:43.161Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["elixir","kafka","kafka-schema","kafka-topic"],"created_at":"2026-03-12T23:08:43.094Z","updated_at":"2026-03-12T23:08:43.851Z","avatar_url":"https://github.com/quiqupltd.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ktsllex\n\n[![Build Status](https://travis-ci.org/quiqupltd/ktsllex.svg?branch=master)](https://travis-ci.org/quiqupltd/ktsllex)\n[![Coverage Status](https://coveralls.io/repos/github/quiqupltd/ktsllex/badge.svg?branch=master)](https://coveralls.io/github/quiqupltd/ktsllex?branch=master) \n[![Hex docs](http://img.shields.io/badge/hex.pm-docs-green.svg?style=flat-square)](https://hexdocs.pm/ktsllex) \n[![Hex Version](http://img.shields.io/hexpm/v/ktsllex.svg?style=flat-square)](https://hex.pm/packages/ktsllex) \n[![License](https://img.shields.io/hexpm/l/ktsllex.svg?style=flat-square)](https://github.com/quiqupltd/ktsllex/blob/master/LICENSE.txt)\n\nKafka Topic and Schema creator\n\n## Setup\n\nAdd `ktsllex` to your `deps` list :\n```elixir\n {:ktsllex, \"~\u003e 0.0.2\"},\n```\n\nRun `mix do deps.get, deps.compile`\n\n### Auto migrations\n\nTo have it run schema migrations at application boot time.\n\nAdd `ktsllex` to your app boot sequence. After `logger`, and before any schema reading apps.\n\n```elixir\n      extra_applications: [\n        :logger,\n        ...\n        :ktsllex,\n        ...\n        :event_serializer\n```\n\nAnd update config.exs\n\n```elixir\n  config :ktsllex,\n    # Should it run the migration when called? Default: false\n    run_migrations: false,\n    schema_registry_host: {:system, \"AVLIZER_CONFLUENT_SCHEMAREGISTRY_URL\", \"http://localhost:8081\"},\n    # Reads the yaml schema file from :\n    base_path: {:system, \"KAFKA_SCHEMA_BASE_PATH\", \"./schemas\"},\n    schema_name: {:system, \"KAFKA_SCHEMA_NAME\", \"schema_name\"},\n    app_name: :app,\n    lenses_host: {:system, \"LENSES_HOST\", \"http://localhost:3030\"},\n    lenses_user: {:system, \"LENSES_USER\", \"admin\"},\n    lenses_pass: {:system, \"LENSES_PASS\", \"admin\"},\n    lenses_topic: {:system, \"LENSES_TOPIC\", \"topic_name\"}\n```\n\n* `base_path` - needs to be relitive to a path that is releasted with your app, eg `priv`\n\n\n## Usage\n\nYou have access to `create_schemas` and `create_topics` mix tasks, eg:\n\n```bash\n$ mix create_schemas --host=localhost:8081 --schema=schema_name --base=./path/to/schemas/json\n$ mix create_topics --host=localhost:3030 --user=admin --password=admin --topic=topic_name\n```\n\n### Options\n\n* `--base`\n\nThe path to the schema files is passed into `mix create_schemas` via `--base=./path/to/schemas/json`.\n\nIt expects to find two files there, one ending `-key.json` and one `-value.json`.\n\nExample: If this command was used:\n\n```bash\nmix create_schemas --base=./schemas/users\n```\n\nThen there should be two flies in ./schemas:\n\n* `./schemas-key.json`\n* `./schemas-value.json`\n\n* `--schema`\n\nThe `-key` and `-value` schemas get updated based on the `schema` parameter\n\nExample: Given this `myschema` command :\n\n```bash\nmix create_schemas --schema=myschema\n```\n\nAnd if this is the `schemas-key.json` file :\n\n```json\n{\n  \"type\": \"record\",\n  \"name\": \"Key\",\n  \"namespace\": \"anything\",\n  \"connect.name\": \"anything.Key\"\n}\n```\n\nThen it would be updated to\n\n```json\n{\n  \"type\": \"record\",\n  \"name\": \"Key\",\n  \"namespace\": \"myschema\",\n  \"connect.name\": \"myschema.Key\"\n}\n```\n\n### Compatibility Config\n\nTo `get` or `set` compatibility config :\n\n```elixir\n# Get global\niex\u003e Ktsllex.Config.get(\"http://localhost:8081\")\n%{\"compatibilityLevel\" =\u003e \"BACKWARD\"}\n\n# Set global\niex\u003e Ktsllex.Config.set(\"http://localhost:8081\", \"BACKWARD\")\n%{\"compatibilityLevel\" =\u003e \"BACKWARD\"}\n\n# Get for a given topic name\niex\u003e Ktsllex.Config.get(\"http://localhost:8081\", \"topic-name\")\n%{\"compatibilityLevel\" =\u003e \"BACKWARD\"}\n\n# Set for a given topic name\niex\u003e Ktsllex.Config.set(\"http://localhost:8081\", \"BACKWARD\", \"topic-name\")\n%{\"compatibilityLevel\" =\u003e \"BACKWARD\"}\n```\n\nIf getting a topic that does not have a compatibility set, it will return this:\n\n```elixir\n%{\"error_code\" =\u003e 40401, \"message\" =\u003e \"Subject not found.\"}\n```\n\n## Development\n\n* `mix deps.get`\n* `mix test`\n\n## License\n\nCopyright (c) 2018 Quiqup LTD, MIT License.\nSee [LICENSE.txt](https://github.com/quiqupltd/ktsllex/blob/master/LICENSE.txt) for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiqupltd%2Fktsllex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquiqupltd%2Fktsllex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquiqupltd%2Fktsllex/lists"}