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 | Auto-detected annotations | Example Project | Latest Plugin 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 |
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-generic-binding
add-on
The springwolf-generic-binding
add-on allows to document any binding.
This includes bindings not supported by Springwolf, but also any custom fields not part of the AsyncAPI specification.
@AsyncPublisher(...)
@AsyncGenericOperationBinding(
type = "custom-protocol-binding",
fields = {
"internal-field=customValue",
"nested.key=nestedValue"})
public void sendMessage(AnotherPayloadDto msg) {
// publish message
}