Skip to content

Commit

Permalink
Improve doc (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogervinas authored Nov 10, 2023
1 parent efadcc4 commit 7d257fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ interface MyEventConsumer {

Then we follow these steps:

### 1) We configure the binding `my-consumer` in application.yml but declaring it as a function:
### 1) We declare the binding `my-consumer` in application.yml:
```yaml
spring:
cloud:
Expand All @@ -171,7 +171,7 @@ spring:
* We configure a `group` because we want the application to consume from Kafka identifiying itself as a consumer group so if there were to be more than one instance of the application every message will be delivered to only one of the instances.
* As stated in [functional binding names](https://docs.spring.io/spring-cloud-stream/docs/current/reference/html/spring-cloud-stream.html#_functional_binding_names): `my-consumer` is the function name, `in` is for input bindings and `0` is the index we have to use if we have a single function.

### 2) We create the same class `MyStreamEventConsumer` but implementing `Consumer<MyEventPayload>` to fulfill the interface required by Spring Cloud Stream:
### 2) We create the same class `MyStreamEventConsumer` implementing `Consumer<MyEventPayload>` to fulfill the interface required by Spring Cloud Stream:
```kotlin
class MyStreamEventConsumer(private val consumer: MyEventConsumer) : Consumer<MyEventPayload> {
override fun accept(payload: MyEventPayload) {
Expand Down

0 comments on commit 7d257fa

Please sign in to comment.