npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ekozynin/asyncapi-kafka-template

v0.0.4

Published

Generates scripts to deploy kafka topology in a kafka cluster.

Readme

Confluent Kafka logo

Confluent Kafka generator

This template will generate python scripts to create kafka topology in an existing Kafka cluster based on your AsyncApi.

The following Confluent Kafka components can be defined using AsyncApi specification:

  • topics
  • schema definitions
  • [TODO] connectors
  • [TODO] KSql

Table of Contents

Usage

  Usage: ag [options] <asyncapi.yaml> @ekozynin/asyncapi-kafka-template

  Options:
    --force-write               force writing of the generated files to given directory (defaults to false)
    -o, --output <outputDir>    directory where to put the generated files (defaults to current directory)

Run it

The generated scripts were tested with python 3.9.7

Go to the root folder of the generated code and run this command (you need python):

  Usage: python main.py -e <environment>

  Options:
    environment   one of the "servers" definitions in your asyncapi file

First time you may need to install additional python dependencies. Go to the root folder of the generated code and install required python dependencies:

pip install -U -r python-requirements.txt

Special Considerations

Servers

Kafka cluster usually has different components to deploy Kafka topology to: brokers, schema registry, connectors, KSql.

To name the servers follow this rules:

  • server name should start with the environment name (such as local, dev, prod)
  • followed by dash '-'
  • followed by component type. One of: 'broker', 'schemaRegistry'

Security

To connect to Confluent Cloud Cluster, the servers above should have 'security' attribute defined. Security schemas must be defined exactly as below. Refer to full example.

components:
  securitySchemes:
    confluentBroker:
      type: userPassword
      x-configs:
        security.protocol: sasl_ssl
        sasl.mechanisms: PLAIN
        sasl.username: '{{ CLUSTER_API_KEY }}'
        sasl.password: '{{ CLUSTER_API_SECRET }}'

    confluentSchemaRegistry:
      type: userPassword
      x-configs:
        basic.auth.user.info: '{{ SCHEMA_REGISTRY_API_KEY }}:{{ SCHEMA_REGISTRY_API_SECRET }}'

Environment variables

Use environment variables to pass security details when deploying kafka topology.

The names for environment variables are:

  • CLUSTER_API_KEY
  • CLUSTER_API_SECRET
  • SCHEMA_REGISTRY_API_KEY
  • SCHEMA_REGISTRY_API_SECRET

AsyncApi Extensions

Additional extensions to the AsyncApi specification that this generator understands.

Contributors