Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 7.4 KB

File metadata and controls

75 lines (53 loc) · 7.4 KB
sidebar_position 15

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 Maven Central
Cloud Functions @Bean (functional interface) springwolf-cloud-stream Maven Central
JMS @JmsListener springwolf-jms-example Maven Central
Kafka @KafkaListener, @KafkaHandler springwolf-kafka-example Maven Central
SNS springwolf-sns-example Maven Central
SQS @SqsListener springwolf-sqs-example Maven Central
STOMP (WebSocket) @MessageMapping, @SendTo, @SendToUser springwolf-stomp-example Maven Central

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 Maven Central
GooglePubSub @GooglePubSubAsyncChannelBinding Maven Central
JMS @JmsAsyncOperationBinding Maven Central
Kafka @KafkaAsyncOperationBinding Maven Central
SNS @SnsAsyncOperationBinding Maven Central
SQS @SqsAsyncOperationBinding Maven Central
STOMP (WebSocket) @StompAsyncOperationBinding Maven Central

:::info See Add-Ons / Generic Annotation Binding :::

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 ProtobufConfiguration for details.