Skip to content

Commit d78dcea

Browse files
jonaslagonismoyanickshoekaushik-rishifmvilas
authored
feat!: release for version 3.0.0 of the spec (#759)
Co-authored-by: Sergio Moya <[email protected]> Co-authored-by: nickshoe <[email protected]> Co-authored-by: Rishi <[email protected]> Co-authored-by: Fran Méndez <[email protected]> Co-authored-by: Heiko Henning <[email protected]> Co-authored-by: Lukasz Gornicki <[email protected]> Co-authored-by: samz <[email protected]> Co-authored-by: Maciej Urbańczyk <[email protected]> Co-authored-by: Vladimír Gorej <[email protected]>
1 parent 83fd0b9 commit d78dcea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5476
-2090
lines changed

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
with:
2020
node-version: 18
2121
- name: Add plugin for conventional commits
22-
run: npm install --save-dev conventional-changelog-conventionalcommits@5.0.0
22+
run: npm install --save-dev conventional-changelog-conventionalcommits@6.1.0
2323
- name: Release to GitHub
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
2626
GIT_AUTHOR_NAME: asyncapi-bot
2727
GIT_AUTHOR_EMAIL: [email protected]
2828
GIT_COMMITTER_NAME: asyncapi-bot
2929
GIT_COMMITTER_EMAIL: [email protected]
30-
run: npx semantic-release@17.4.3
30+
run: npx semantic-release@21.0.7

examples/README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@
22

33
In this directory, you can find some examples of AsyncAPI documents.
44

5-
**Do you have an example that could be valuable?** Open a pull request to contribute it.
5+
**Do you have an example that could be valuable?** Open a pull request to contribute it.
6+
7+
## File naming
8+
9+
You may notice `asyncapi` in the the name of each example. We recommend doing the same with your AsyncAPI document. This way you enable features like documentation display on node hover, auto completion and validation of your AsyncAPI documents in IDEs like VSCode or IntelliJ IDEA. IDEs integrate with [SchemaStore](https://www.schemastore.org/json/) where AsyncAPI specification JSON Schema files are referenced. Some IDEs do it by default, some, like VSCode require you to install additional extensions, like `YAML` extension.
10+
11+
## Editors
12+
13+
To edit your AsyncAPI documents, you can use [AsyncAPI Studio](https://studio.asyncapi.com/).
14+
15+
If you prefer to use your favourite IDE, there are official extensions for [VSCode](https://marketplace.visualstudio.com/items?itemName=asyncapi.asyncapi-preview) and [IntelliJ IDEA](https://plugins.jetbrains.com/plugin/15673-asyncapi)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,333 @@
1+
asyncapi: 3.0.0
2+
info:
3+
title: Adeo AsyncAPI Case Study
4+
version: "%REPLACED_BY_MAVEN%"
5+
description: >
6+
This Adeo specification illustrates how ADEO uses AsyncAPI to document some of their exchanges
7+
contact:
8+
name: AsyncAPI team
9+
10+
tags:
11+
- name: costing
12+
description: "Costing channels, used by Costing clients."
13+
servers:
14+
production:
15+
host: "prod.url:9092"
16+
protocol: kafka-secure
17+
description: Kafka PRODUCTION cluster
18+
security:
19+
- $ref: '#/components/securitySchemes/sasl-ssl'
20+
bindings:
21+
kafka:
22+
schemaRegistryUrl: >-
23+
https://schema-registry.prod.url/
24+
staging:
25+
host: "staging.url:9092"
26+
protocol: kafka-secure
27+
description: Kafka STAGING cluster for `uat` and `preprod` environments
28+
security:
29+
- $ref: '#/components/securitySchemes/sasl-ssl'
30+
bindings:
31+
kafka:
32+
schemaRegistryUrl: >-
33+
https://schema-registry.staging.url/
34+
dev:
35+
host: "dev.url:9092"
36+
protocol: kafka-secure
37+
description: Kafka DEV cluster for `dev` and `sit` environments
38+
security:
39+
- $ref: '#/components/securitySchemes/sasl-ssl'
40+
bindings:
41+
kafka:
42+
schemaRegistryUrl: >-
43+
https://schema-registry.dev.url/
44+
45+
channels:
46+
costingRequest:
47+
address: "adeo-{env}-case-study-COSTING-REQUEST-{version}"
48+
description: >
49+
Use this topic to do a Costing Request to Costing product.
50+
We use the
51+
[**RecordNameStrategy**](https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#subject-name-strategy)
52+
to infer the messages schema.
53+
You have to define `x-value.subject.name.strategy` to
54+
`io.confluent.kafka.serializers.subject.RecordNameStrategy` in your
55+
producer to use the schema we manage.
56+
The schema below illustrates how Costing Request messages are
57+
handled.
58+
![](https://user-images.githubusercontent.com/5501911/188920831-689cec5f-8dc3-460b-8794-0b54ec8b0ac8.png)
59+
parameters:
60+
env:
61+
$ref: "#/components/parameters/Env"
62+
version:
63+
$ref: "#/components/parameters/Version"
64+
bindings:
65+
kafka:
66+
replicas: 3
67+
partitions: 3
68+
topicConfiguration:
69+
cleanup.policy: [ "delete" ]
70+
retention.ms: 604800000
71+
messages:
72+
costingRequest:
73+
$ref: "#/components/messages/costingRequestV1"
74+
75+
76+
77+
78+
79+
costingResponse:
80+
address: "adeo-{env}-case-study-COSTING-RESPONSE-{version}"
81+
description: >
82+
This topic is used to REPLY Costing Requests and is targeted by the
83+
`REPLY_TOPIC` header.
84+
**You must grant PUBLISH access to our `svc-ccr-app` service account.**.
85+
We use the
86+
[**RecordNameStrategy**](https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#subject-name-strategy)
87+
to infer the messages schema.
88+
You have to define `key.subject.name.strategy` and
89+
`x-value.subject.name.strategy` to
90+
`io.confluent.kafka.serializers.subject.RecordNameStrategy` in your
91+
consumer.
92+
The schema below illustrates how Costing Response messages are
93+
handled.
94+
![](https://user-images.githubusercontent.com/5501911/188920831-689cec5f-8dc3-460b-8794-0b54ec8b0ac8.png)
95+
parameters:
96+
env:
97+
$ref: "#/components/parameters/Env"
98+
version:
99+
$ref: "#/components/parameters/Version"
100+
bindings:
101+
kafka:
102+
x-key.subject.name.strategy:
103+
type: string
104+
description: >
105+
We use the RecordNameStrategy to infer the messages schema.
106+
Use
107+
`x-key.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
108+
in your consumer configuration.
109+
x-value.subject.name.strategy:
110+
type: string
111+
description: >
112+
We use the RecordNameStrategy to infer the messages schema.
113+
Use
114+
`x-value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
115+
in your consumer configuration.
116+
messages:
117+
costingResponse:
118+
$ref: "#/components/messages/costingResponse"
119+
120+
121+
122+
123+
operations:
124+
requestCosting:
125+
action: receive
126+
channel:
127+
$ref: '#/channels/costingRequest'
128+
reply:
129+
channel:
130+
$ref: '#/channels/costingResponse'
131+
address:
132+
location: '$message.header#/REPLY_TOPIC'
133+
summary: |
134+
[COSTING] Request one or more Costing calculation for any product
135+
description: >
136+
You can try a costing request using our [Conduktor producer
137+
template](https://conduktor.url)
138+
tags:
139+
- name: costing
140+
bindings:
141+
kafka:
142+
groupId:
143+
type: string
144+
description: >
145+
The groupId must be prefixed by your `svc` account, deliver by the
146+
Adeo Kafka team.
147+
This `svc` must have the write access to the topic.
148+
x-value.subject.name.strategy:
149+
type: string
150+
description: >
151+
We use the RecordNameStrategy to infer the messages schema.
152+
Use
153+
`x-value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
154+
in your producer configuration.
155+
getCostingResponse:
156+
action: send
157+
channel:
158+
$ref: '#/channels/costingResponse'
159+
summary: >
160+
[COSTING] Get the costing responses matching an initial Costing
161+
Request.
162+
bindings:
163+
kafka:
164+
groupId:
165+
type: string
166+
description: >
167+
The groupId must be prefixed by your `svc` account, deliver by the
168+
Adeo Kafka team.
169+
This `svc` must have the read access to the topic.
170+
tags:
171+
- name: costing
172+
173+
174+
175+
176+
177+
components:
178+
correlationIds:
179+
costingCorrelationId:
180+
description: >
181+
This correlation ID is used for message tracing and messages
182+
correlation.
183+
This correlation ID is generated at runtime based on the `REQUEST_ID`
184+
and sent to the RESPONSE message.
185+
location: $message.header#/REQUEST_ID
186+
messages:
187+
costingRequestV1:
188+
name: CostingRequestV1
189+
title: Costing Request V1
190+
summary: Costing Request V1 inputs.
191+
tags:
192+
- name: costing
193+
correlationId:
194+
$ref: "#/components/correlationIds/costingCorrelationId"
195+
headers:
196+
type: object
197+
required:
198+
- REQUESTER_ID
199+
- REQUESTER_CODE
200+
- REQUEST_ID
201+
- REPLY_TOPIC
202+
properties:
203+
REQUEST_ID:
204+
$ref: "#/components/schemas/RequestId"
205+
REPLY_TOPIC:
206+
$ref: "#/components/schemas/ReplyTopic"
207+
REQUESTER_ID:
208+
$ref: "#/components/schemas/RequesterId"
209+
REQUESTER_CODE:
210+
$ref: "#/components/schemas/RequesterCode"
211+
payload:
212+
schemaFormat: application/vnd.apache.avro;version=1.9.0
213+
schema:
214+
$ref: "https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc"
215+
costingResponse:
216+
name: CostingResponse
217+
title: Costing Response
218+
summary: Costing Response ouputs.
219+
tags:
220+
- name: costing
221+
description: >
222+
Please refer to the `CostingResponseKey.avsc` schema, available on [our
223+
github
224+
project](https://github.url/).
225+
correlationId:
226+
$ref: "#/components/correlationIds/costingCorrelationId"
227+
headers:
228+
type: object
229+
properties:
230+
CALCULATION_ID:
231+
$ref: "#/components/schemas/MessageId"
232+
CORRELATION_ID:
233+
$ref: "#/components/schemas/CorrelationId"
234+
REQUEST_TIMESTAMP:
235+
type: string
236+
format: date-time
237+
description: Timestamp of the costing request
238+
CALCULATION_TIMESTAMP:
239+
type: string
240+
format: date-time
241+
description: Technical timestamp for the costing calculation
242+
bindings:
243+
kafka:
244+
key:
245+
$ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponseKey.avsc"
246+
payload:
247+
schemaFormat: application/vnd.apache.avro;version=1.9.0
248+
schema:
249+
$ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponsePayload.avsc"
250+
schemas:
251+
RequesterId:
252+
type: string
253+
description: The Costing requester service account used to produce costing request.
254+
example: svc-ecollect-app
255+
RequesterCode:
256+
type: string
257+
description: >-
258+
The Costing requester code (generally the BU Code). The requester code
259+
is useful to get the dedicated context (tenant).
260+
example: 1
261+
MessageId:
262+
type: string
263+
format: uuid
264+
description: A unique Message ID.
265+
example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
266+
RequestId:
267+
type: string
268+
format: uuid
269+
description: >-
270+
A unique Request ID needed to define a `CORRELATION_ID` for exchanges,
271+
which will be sent back in the Costing Responses.
272+
example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
273+
CorrelationId:
274+
type: string
275+
format: uuid
276+
description: >-
277+
A unique Correlation ID defined from the `REQUEST_ID` or the
278+
`MESSAGE_ID` provided in the Costing Request.
279+
example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
280+
BuCode:
281+
type: string
282+
description: The Business Unit code for which data are applicable.
283+
example: 1
284+
ReplyTopic:
285+
type: string
286+
description: >
287+
The Kafka topic where to send the Costing Response. This is required for
288+
the [Return Address EIP
289+
pattern](https://www.enterpriseintegrationpatterns.com/patterns/messaging/ReturnAddress.html).
290+
**You must grant WRITE access to our `svc-ccr-app` service account.**
291+
example: adeo-case-study-COSTING-RESPONSE-V1
292+
ErrorStep:
293+
type: string
294+
description: |
295+
The woker that has thrown the error.
296+
example: EXPOSE_RESULT
297+
ErrorMessage:
298+
type: string
299+
description: |
300+
The error message describing the error.
301+
example: Error message
302+
ErrorCode:
303+
type: string
304+
description: |
305+
The error code.
306+
example: CURRENCY_NOT_FOUND
307+
parameters:
308+
Env:
309+
description: Adeo Kafka Environement for messages publications.
310+
enum:
311+
- dev
312+
- sit
313+
- uat1
314+
- preprod
315+
- prod
316+
Version:
317+
description: the topic version you want to use
318+
examples:
319+
- V1
320+
default: V1
321+
securitySchemes:
322+
sasl-ssl:
323+
type: plain
324+
x-sasl.jaas.config: >-
325+
org.apache.kafka.common.security.plain.PlainLoginModule required
326+
username="<CLUSTER_API_KEY>" password="<CLUSTER_API_SECRET>";
327+
x-security.protocol: SASL_SSL
328+
x-ssl.endpoint.identification.algorithm: https
329+
x-sasl.mechanism: PLAIN
330+
description: >
331+
Use [SASL authentication with SSL
332+
encryption](https://docs.confluent.io/platform/current/security/security_tutorial.html#configure-clients)
333+
to connect to the ADEO Broker.

0 commit comments

Comments
 (0)