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

Add Kafka bindings #29

Closed
m-wild opened this issue Oct 4, 2020 · 1 comment
Closed

Add Kafka bindings #29

m-wild opened this issue Oct 4, 2020 · 1 comment
Labels
📗 documentation Improvements or additions to documentation 💡 enhancement New feature or request

Comments

@m-wild
Copy link
Collaborator

m-wild commented Oct 4, 2020

Kafka is a popular message broker.
We should provide

  • classes for Kafka bindings,
  • documentation on how to use Kafka bindings

https://github.com/asyncapi/bindings/tree/master/kafka

Bindings are currently usable by creating a filter which adds the binding.
e.g.

services.AddAsyncApiSchemaGeneration(options =>
{
    options.ChannelItemFilters.Add(new MyAmqpChannelFilter());
}

class MyAmqpChannelFilter : IChannelItemFilter
{
    public void Apply(ChannelItem channelItem, ChannelItemFilterContext context)
    {
        channelItem.Bindings.Amqp = new AmqpChannelBinding
        {
            Is = AmqpChannelBindingIs.RoutingKey,
            Exchange = new AmqpChannelBindingExchange
            {
                Name = "streetlights",
                Type = "topic",
            }
        };
    }
}
@m-wild m-wild added 💡 enhancement New feature or request good first issue 📗 documentation Improvements or additions to documentation labels Oct 4, 2020
@HUTCHHUTCHHUTCH
Copy link

have put in a pr for this issue

@m-wild m-wild closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📗 documentation Improvements or additions to documentation 💡 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants