@@ -9,63 +9,23 @@ Add at least one binding so that readers know the protocol in use and functional
9
9
10
10
To use the protocol specific bindings, ensure that you have added the corresponding [ plugin] ( ../introduction/supported-protocols.md ) .
11
11
12
- ## Protocol specific annotations
12
+ ## Operation binding
13
13
14
- ### ` @AmqpAsyncOperationBinding `
14
+ Operation bindings describe protocol-specific information for the specific action (publish or subscribe).
15
+ See [ operation-binding] for details.
15
16
16
- Associate this operation with AMQP, see [ operation-binding ] for details.
17
+ Supported protocol specific bindings:
17
18
18
- ``` java
19
- @AmqpAsyncOperationBinding (cc = " example-topic-routing-key" )
20
- ```
21
-
22
- ### ` @KafkaAsyncOperationBinding `
23
-
24
- Associate this operation with Kafka, see [ operation-binding] for details.
25
-
26
- ``` java
27
- @KafkaAsyncOperationBinding (
28
- bindingVersion = " 1"
29
- )
30
- ```
31
-
32
- ### ` @JmsAsyncOperationBinding `
33
-
34
- Associate this operation with JMS, see [ operation-binding] for details.
35
-
36
- ``` java
37
- @JmsAsyncOperationBinding
38
- ```
39
-
40
- ### ` @SnsAsyncOperationBinding `
41
-
42
- Associate this operation with SNS, see [ operation-binding] for details.
43
-
44
- ``` java
45
- @SnsAsyncOperationBinding
46
- ```
47
-
48
- ### ` @SqsAsyncOperationBinding `
19
+ - ` @AmqpAsyncOperationBinding `
20
+ - ` @KafkaAsyncOperationBinding `
21
+ - ` @JmsAsyncOperationBinding `
22
+ - ` @SnsAsyncOperationBinding `
23
+ - ` @SqsAsyncOperationBinding `
24
+ - ` @StompAsyncOperationBinding `
49
25
50
- Associate this operation with SQS, see [ operation-binding ] for details.
26
+ ### Generic annotation
51
27
52
- ``` java
53
- @SqsAsyncOperationBinding
54
- ```
55
-
56
- ### ` @StompAsyncOperationBinding `
57
-
58
- Associate this operation with STOMP (WebSocket), see [ operation-binding] for details.
59
-
60
- ``` java
61
- @StompAsyncOperationBinding
62
- ```
63
-
64
- ## Generic annotation
65
-
66
- This binding is generic, so that any properties can be specified.
67
-
68
- ### ` @AsyncGenericOperationBinding `
28
+ For custom protocols or properties, use the generic binding.
69
29
70
30
You can define anything and there is no validation.
71
31
@@ -83,6 +43,16 @@ You can define anything and there is no validation.
83
43
See [ Add-Ons / Generic Annotation Binding] ( ../introduction/add-ons.mdx#generic-binding ) for more information
84
44
:::
85
45
46
+ ## Channel binding
47
+
48
+ Channel bindings describe protocol-specific information for the channel (topic, queue, etc).
49
+ See [ channel-binding] for details.
50
+
51
+ Supported protocol specific bindings:
52
+
53
+ - ` @KafkaAsyncChannelBinding `
54
+ - ` @GooglePubSubAsyncChannelBinding `
55
+
86
56
## Binding properties
87
57
88
58
Explanation of the different binding properties.
@@ -123,6 +93,21 @@ The routing key used when publishing a message.
123
93
124
94
### Kafka
125
95
96
+ Channel Binding Object:
97
+
98
+ ``` java
99
+ @KafkaAsyncChannelBinding (
100
+ partitions = 3 ,
101
+ replicas = 1 ,
102
+ topicConfiguration =
103
+ @KafkaAsyncChannelBinding.KafkaChannelTopicConfiguration (
104
+ cleanup = {CleanupPolicy . COMPACT , CleanupPolicy . DELETE },
105
+ retentionMs = 86400000L ,
106
+ retentionBytes = - 1L ,
107
+ deleteRetentionMs = 86400000L ,
108
+ maxMessageBytes = 1048588 ))
109
+ ```
110
+
126
111
#### Group Id
127
112
128
113
The group id that will be used during message consumption
@@ -133,8 +118,6 @@ The client id to identify the consumer
133
118
134
119
### Google PubSub
135
120
136
- #### Channel Binding Object
137
-
138
121
The Channel Bindings Object is used to describe the Google Cloud Pub/Sub Topic details.
139
122
140
123
``` java
@@ -180,3 +163,4 @@ The Message Binding Object is used to describe the Google Cloud Pub/Sub PubsubMe
180
163
- name: The name of the schema
181
164
182
165
[ operation-binding ] : https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationBindingsObject
166
+ [ channel-binding ] : https://www.asyncapi.com/docs/reference/specification/v3.0.0#channelBindingsObject
0 commit comments