Skip to content

Commit e66a4d9

Browse files
committed
docs: Rename AsyncSubscriber to AsyncListener
Follow up to springwolf/springwolf-core#127
1 parent 8ba15c7 commit e66a4d9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ There are 2 ways to configure springwolf:
4444

4545
It is recommended to structure the project such that all consumers and producers (classes containing listener/producer methods) are in the same package - it is not mandatory, and if they are scattered across multiple packages, just provide the highest in hierarchy package that contains all of them.
4646

47-
The base package will be scanned for classes containing `@Component` annotated classes (that includes `@Service` annotated classes) for methods annotated with `@KafkaListener`, `@RabbitListener`, `@AsyncSubscriber`, `@AsyncPublisher`, etc.
47+
The base package will be scanned for classes containing `@Component` annotated classes (that includes `@Service` annotated classes) for methods annotated with `@KafkaListener`, `@RabbitListener`, `@AsyncListener`, `@AsyncPublisher`, etc.
4848

4949
### Info (required)
5050

docs/documenting-consumers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ Sometimes projects are configured in a way that makes Springwolf unable to autom
1010
For these use-cases, Springwolf provides additional ways to explicitly add them to the generated document.
1111

1212
To document consumers, either:
13-
- add the `@AsyncSubscriber` annotation or
13+
- add the `@AsyncListener` annotation or
1414
- declare the `ConsumerData` object as part of the `AsyncApiDocket` or
1515
- rely on the auto-detection of `@KafkaListener`, `@RabbitListener`
1616

17-
You are free to use all options together. Per channel and operation, first `ConsumerData` is used, then `@AsyncSubscriber` and last the auto-detected annotations.
17+
You are free to use all options together. Per channel and operation, first `ConsumerData` is used, then `@AsyncListener` and last the auto-detected annotations.
1818

19-
## Option 1: `@AsyncSubscriber`
19+
## Option 1: `@AsyncListener`
2020

21-
The `@AsyncSubscriber` annotation is added to the method of the listeners and extracts the payload from its arguments.
21+
The `@AsyncListener` annotation is added to the method of the listeners and extracts the payload from its arguments.
2222
Additional fields can be documented.
2323

2424
The protocol operation binding is configured via `@AmqpAsyncOperationBinding` or `@KafkaAsyncOperationBinding`, which has to be on the same method.
2525

2626
Below is an example to demonstrate the annotation:
2727
```java
2828
@KafkaListener
29-
@AsyncSubscriber(operation = @AsyncOperation(
29+
@AsyncListener(operation = @AsyncOperation(
3030
channelName = "example-consumer-topic",
3131
description = "Optional. Customer uploaded an example payload",
3232
headers = @AsyncOperation.Headers(

0 commit comments

Comments
 (0)