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

KafkaConsumerActor should be public API #362

Open
ismaelhamed opened this issue Jul 23, 2023 · 3 comments
Open

KafkaConsumerActor should be public API #362

ismaelhamed opened this issue Jul 23, 2023 · 3 comments

Comments

@ismaelhamed
Copy link
Member

ismaelhamed commented Jul 23, 2023

I've noticed the KafkaConsumerActor feature to share a KafkaConsumer instance via the PlainExternalSource is implemented but is kept internal.

@ismaelhamed ismaelhamed changed the title KafkaConsumeActor should be public API KafkaConsumerActor should be public API Jul 23, 2023
@Aaronontheweb
Copy link
Member

cc @Arkatufus

@Arkatufus
Copy link
Contributor

Arkatufus commented Aug 22, 2023

@ismaelhamed This is fine, what you need to do is pass a consumer factory delegate function to the ConsumerSettings<TKey, TValue> class instance like so:

var consumerSettings = ConsumerSettings<string, string>.Create(system, null, null)
    .WithBootstrapServers("localhost:29092")
    .WithGroupId("group1")
    .WithProperty("session.timeout.ms", "6000")
    .WithConsumerFactory(settings => myConsumer);

@ismaelhamed
Copy link
Member Author

@Arkatufus are we talking different use cases? See documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants