Skip to content

Commit 6b475e3

Browse files
committed
docs: improve documentation on wire-format
1 parent 2a86325 commit 6b475e3

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

docs/behind-the-scenes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ From there, Springwolf forwards the message to the protocol specific producer.
2020
## Plugins
2121

2222
`springwolf-core` provides the base functionality to orchestrate the scanning and building of the AsyncAPI document.
23-
The different protocol (AMQP, Cloud-Stream, JMS, Kafka, SNS, SQS, STOMP/WebSocket) are supported through plugins.
23+
The [different protocol](./introduction/supported-protocols.md) are supported through plugins.
2424
These plugins are found through the Spring dependency injection functionality.
2525
When building own scanner plugins, your plugin will need to implement the `ChannelsScanner` interface.
2626

docs/introduction/introduction.md

+2-12
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,11 @@ However, until now there were no solutions for asynchronous APIs (such as AMQP,
1717

1818
Springwolf is compliant to [AsyncAPI](https://www.asyncapi.com), which brings the [swagger/OpenAPI](https://www.asyncapi.com/docs/tutorials/getting-started/coming-from-openapi) specification you know already from REST APIs into the world of event-driven architectures.
1919

20-
### Demo
20+
## Demo
2121

2222
View the [live demo](https://demo.springwolf.dev) of Springwolf in action.
2323

24-
Also, the demos of the
25-
[AMQP](https://amqp.demo.springwolf.dev),
26-
[Spring Cloud Stream](https://cloud-stream.demo.springwolf.dev),
27-
[JMS](https://jms.demo.springwolf.dev),
28-
[Kafka](https://kafka.demo.springwolf.dev),
29-
[SNS](https://sns.demo.springwolf.dev),
30-
[SQS](https://sqs.demo.springwolf.dev),
31-
[STOMP (WebSocket)](https://stomp.demo.springwolf.dev)
32-
example projects are available.
33-
34-
![Springwolf publishing demo](/img/demo.gif)
24+
[![Springwolf publishing demo](/img/demo.gif)](https://demo.springwolf.dev)
3525

3626
## What does it do
3727

docs/introduction/supported-protocols.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ any protocol can be defined using Springwolf custom annotations `@AsyncListener`
1010
## Native Support
1111

1212
The following protocols are supported natively:
13-
14-
| Protocol | Auto-detected annotations | Example Project | Latest Plugin Version |
13+
| Protocol + Demo | Auto-detected annotations | Example Project | Latest Version |
1514
|-------------------|---------------------------------------------|-------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
16-
| AMQP (RabbitMQ) | `@RabbitListener` | [`springwolf-amqp-example`][amqp] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-amqp?color=green&label=springwolf-amqp&style=plastic) |
17-
| Cloud Functions | `@Bean` (functional interface) | [`springwolf-cloud-stream`][cloud-stream] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-cloud-stream?color=green&label=springwolf-cloud-stream&style=plastic) |
18-
| JMS | `@JmsListener` | [`springwolf-jms-example`][jms] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-jms?color=green&label=springwolf-jms&style=plastic) |
19-
| Kafka | `@KafkaListener`, `@KafkaHandler` | [`springwolf-kafka-example`][kafka] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-kafka?color=green&label=springwolf-kafka&style=plastic) |
20-
| SNS | | [`springwolf-sns-example`][sns] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-sns?color=green&label=springwolf-sns&style=plastic) |
21-
| SQS | `@SqsListener` | [`springwolf-sqs-example`][sqs] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-sqs?color=green&label=springwolf-sqs&style=plastic) |
22-
| STOMP (WebSocket) | `@MessageMapping`, `@SendTo`, `@SendToUser` | [`springwolf-stomp-example`][stomp] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-stomp?color=green&label=springwolf-stomp&style=plastic) |
15+
| [AMQP (RabbitMQ)](https://amqp.demo.springwolf.dev) | `@RabbitListener` | [`springwolf-amqp-example`][amqp] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-amqp?color=green&label=springwolf-amqp&style=plastic) |
16+
| [Cloud Functions](https://cloud-stream.demo.springwolf.dev) | `@Bean` (functional interface) | [`springwolf-cloud-stream`][cloud-stream] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-cloud-stream?color=green&label=springwolf-cloud-stream&style=plastic) |
17+
| [JMS](https://jms.demo.springwolf.dev) | `@JmsListener` | [`springwolf-jms-example`][jms] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-jms?color=green&label=springwolf-jms&style=plastic) |
18+
| [Kafka](https://kafka.demo.springwolf.dev) | `@KafkaListener`, `@KafkaHandler` | [`springwolf-kafka-example`][kafka] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-kafka?color=green&label=springwolf-kafka&style=plastic) |
19+
| [SNS](https://sns.demo.springwolf.dev) | | [`springwolf-sns-example`][sns] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-sns?color=green&label=springwolf-sns&style=plastic) |
20+
| [SQS](https://sqs.demo.springwolf.dev) | `@SqsListener` | [`springwolf-sqs-example`][sqs] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-sqs?color=green&label=springwolf-sqs&style=plastic) |
21+
| [STOMP (WebSocket)](https://stomp.demo.springwolf.dev) | `@MessageMapping`, `@SendTo`, `@SendToUser` | [`springwolf-stomp-example`][stomp] | ![Maven Central](https://img.shields.io/maven-central/v/io.github.springwolf/springwolf-stomp?color=green&label=springwolf-stomp&style=plastic) |
2322

2423
Check out the example projects, which include a full `docker-compose` setup.
2524
The examples are simple, easy to start with, good for testing and reproducing bugs.
@@ -52,6 +51,21 @@ The supported binding annotations are:
5251
See [Add-Ons / Generic Annotation Binding](../add-ons#generic-binding)
5352
:::
5453

54+
## Wire format (Data serialization)
55+
56+
Besides the classical JSON events, Springwolf has best-effort support for some other wire formats.
57+
58+
### Avro
59+
60+
[Avro](https://avro.apache.org) is supported out-of-the box and demoed in [kafka example](#native-support).
61+
62+
### Protobuf
63+
64+
[Protobuf](https://protobuf.dev) is demoed in [kafka example](#native-support).
65+
66+
To remove the fields generated by the Protobuf class generated, add a `ModelResolver` bean, which uses the `ProtobufModule` to your project.
67+
See [ObjectMapperConfiguration](https://github.com/springwolf/springwolf-core/blob/master/springwolf-examples/springwolf-kafka-example/src/main/java/io/github/springwolf/examples/kafka/configuration/ObjectMapperConfiguration.java) for details.
68+
5569
[amqp]:https://github.com/springwolf/springwolf-core/tree/master/springwolf-examples/springwolf-amqp-example
5670
[cloud-stream]:https://github.com/springwolf/springwolf-core/tree/master/springwolf-examples/springwolf-cloud-stream-example
5771
[jms]: https://github.com/springwolf/springwolf-core/tree/master/springwolf-examples/springwolf-jms-example

0 commit comments

Comments
 (0)