spring-cloud / stream-applications

Functions and Spring Cloud Stream Applications for data driven microservices
https://spring.io/projects/spring-cloud-stream-applications
250 stars 106 forks source link

GH-265: Add Kafka Publisher and Sink #469

Closed artembilan closed 1 year ago

artembilan commented 1 year ago

Fixes https://github.com/spring-cloud/stream-applications/issues/265

artembilan commented 1 year ago

I would prefer to have supplier and source as an individual PR: too many things are involved in the change.

sobychacko commented 1 year ago

Took a quick pass-through. That looks good, @artembilan. As you indicated in a comment, Kafka Consumer, in this context, is very confusing as this is doing exactly the opposite (i.e., producing to Kafka :-) ). But I don't see an easy solution other than documenting it.

artembilan commented 1 year ago

Thanks, @sobychacko !

I wonder if I still need to add this new app into some configs. For example I see properties like this kafka-apps-maven.properties, rabbit-apps-maven-repo-url.properties etc. in the stream-applications-descriptor. Not sure what are those and if they are generated somehow automatically or so.

onobc commented 1 year ago

** wonder if I still need to add this new app into some configs.

@artembilan take a peek at these: https://github.com/spring-cloud/stream-applications/blob/main/stream-applications-release-train/stream-applications-descriptor/src/main/resources/META-INF/kafka-apps-maven.properties

artembilan commented 1 year ago

OK. How about to name it as kafka-publisher and so on for all the configurations and bean names? In the end it doesn't matter how you call it here since the contract is still fulfilled - Consumer<Message<?>> kafkaPublisher. Or producer, or sender...

sobychacko commented 1 year ago

I like kafka-publisher, even though it might be going away from our established conventions. It takes all the confusion away as to what this module does.