| sidebar_position | 15 |
|---|
Besides auto-detection of protocols (native support),
any protocol can be defined using Springwolf custom annotations @AsyncListener and @AsyncPublisher.
The following protocols are supported natively:
| Protocol + Demo | Auto-detected annotations | Example Project | Latest Version |
|---|---|---|---|
| AMQP (RabbitMQ) | @RabbitListener |
springwolf-amqp-example |
|
| Cloud Functions | @Bean (functional interface) |
springwolf-cloud-stream |
|
| JMS | @JmsListener |
springwolf-jms-example |
|
| Kafka | @KafkaListener, @KafkaHandler |
springwolf-kafka-example |
|
| SNS | springwolf-sns-example |
||
| SQS | @SqsListener |
springwolf-sqs-example |
|
| STOMP (WebSocket) | @MessageMapping, @SendTo, @SendToUser |
springwolf-stomp-example |
Check out the example projects, which include a full docker-compose setup.
The examples are simple, easy to start with, good for testing and reproducing bugs.
Please open an issue if you want a protocol to be supported.
Using @AsyncListener and @AsyncPublisher any protocol can be documented, although the binding in the AsyncAPI document will remain empty.
The protocols with native support come along with a @_ProtocolName_Binding annotation to define protocol specific properties.
Springwolf also provides some libraries to document bindings. Those libraries provide a light alternative (without 3rd party dependencies)
The supported binding annotations are:
:::info See Add-Ons / Generic Annotation Binding :::
Besides the classical JSON events, Springwolf has best-effort support for some other wire formats.
Avro is supported out-of-the box and demoed in kafka example.
Protobuf is demoed in kafka example.
To remove the fields generated by the Protobuf class generated, add a ModelResolver bean, which uses the ProtobufModule to your project.
See ProtobufConfiguration for details.