Supported Protocols
Besides auto-detection of protocols (native support),
any protocol can be defined using Springwolf custom annotations @AsyncListener
and @AsyncPublisher
.
Native Support
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.
Any protocol
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-<protocol>-binding
bindings
Springwolf also provides some libraries to document bindings. Those libraries provide a light alternative (without 3rd party dependencies)
The supported binding annotations are:
Protocol | Annotations | Latest Plugin Version |
---|---|---|
AMQP | @AmqpAsyncOperationBinding | |
GooglePubSub | @GooglePubSubAsyncChannelBinding | |
JMS | @JmsAsyncOperationBinding | |
Kafka | @KafkaAsyncOperationBinding | |
SNS | @SnsAsyncOperationBinding | |
SQS | @SqsAsyncOperationBinding | |
STOMP (WebSocket) | @StompAsyncOperationBinding |
Wire format (Data serialization)
Besides the classical JSON events, Springwolf has best-effort support for some other wire formats.
Avro
Avro is supported out-of-the box and demoed in kafka example.
Protobuf
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 ObjectMapperConfiguration for details.