Skip to content

Provide example of creating Kafka topics #139

@CeeJayCee

Description

@CeeJayCee

I have just started investigating Silverback to use with Kafka. Apologies for the simple question:

What is the recommended pattern for creating and configuring topics in Kafka when using Silverback?

I have a basic .NetCore project using a simple Controller. The Controller takes an IEventPublisher in the constructor and uses this to publish messages when an HTTP end point is called.

The topic is created automatically, but I would like control over the creation options.

I have been able to take an IConfluentAdminClientBuilder in the constructor of my controller, and use this to build an IAdminClient which can then call CreateTopicsAsync(). This doesn't feel right!

Is there a better recommended way?

Thanks :-)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions