Skip to content

Commit

Permalink
feat: adapt Kafka bindings to v3 - take 2
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Broudoux <[email protected]>
  • Loading branch information
lbroudoux committed Nov 24, 2023
1 parent 36073fe commit 77b14e7
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,18 @@ This object MUST contain only the properties defined above.
```yaml
channels:
user-signedup:
subscribe:
bindings:
kafka:
groupId:
type: string
enum: ['myGroupId']
clientId:
type: string
enum: ['myClientId']
bindingVersion: '0.4.0'
operations:
userSignup:
action: receive
bindings:
kafka:
groupId:
type: string
enum: ['myGroupId']
clientId:
type: string
enum: ['myClientId']
bindingVersion: '0.4.0'
```


Expand All @@ -158,25 +160,27 @@ This example is valid for any Confluent compatible schema registry. Here we desc
```yaml
channels:
test:
publish:
message:
address: test-topic
messages:
testMessage:
bindings:
kafka:
key:
type: string
enum: ['myKey']
schemaIdLocation: 'payload'
schemaIdPayloadEncoding: '4'
bindingVersion: '0.4.0'
schemaIdLocation: 'payload'
schemaIdPayloadEncoding: '4'
bindingVersion: '0.4.0'
```

This is another example that describes the use if Apicurio schema registry. We describe the `apicurio-new` way of serializing without details on how it's implemented. We reference a [specific lookup strategy](https://www.apicur.io/registry/docs/apicurio-registry/2.2.x/getting-started/assembly-using-kafka-client-serdes.html#registry-serdes-concepts-strategy_registry) that may be used to retrieve schema Id from registry during serialization.

```yaml
channels:
test:
publish:
message:
address: test-topic
messages:
testMessage:
bindings:
kafka:
key:
Expand All @@ -188,5 +192,5 @@ channels:
bindingVersion: '0.4.0'
```

[schemaObject]: https://www.asyncapi.com/docs/specifications/2.4.0/#schemaObject
[referenceObject]: https://www.asyncapi.com/docs/specifications/2.4.0/#referenceObject
[schemaObject]: https://www.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.15#schemaObject
[referenceObject]: https://www.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.15#referenceObject

0 comments on commit 77b14e7

Please sign in to comment.