-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve kafka bindings #678
Closed
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2467288
update kafka adapter and examples/kafka-test asyncapi.yaml file
oviecodes 07e3b12
fix kafka adapter
oviecodes 4850fe6
fix kafka test
oviecodes 76c84cb
update merge
oviecodes 5ab446d
resolved
oviecodes 0221016
update
oviecodes 346321c
chore(release): v0.34.0 (#684)
asyncapi-bot 83a29e5
update
oviecodes 869bda7
chore: update generated docs (#687)
asyncapi-bot f933e9a
fix: update @asyncapi/html-template to 2.1.0 version (#689)
asyncapi-bot 6b2124d
chore(release): v0.35.0 (#690)
asyncapi-bot 8715918
fix: update @asyncapi/generator to 1.17.0 version (#692)
asyncapi-bot 11a9aad
chore(release): v0.35.1 (#693)
asyncapi-bot ce44731
merge with upstream
oviecodes 8815ab2
update
oviecodes 06cce28
update
oviecodes 1d2a50f
update docs
oviecodes c375068
update
oviecodes 4cabb36
update
oviecodes dd881f8
update package.json
oviecodes 989e584
fix conflict
oviecodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
title: "Create AsyncAPI Glee template" | ||
weight: 30 | ||
--- | ||
This tutorial teaches you how to create a simple glee template. You'll use the AsyncAPI Glee template that you develop to generate Javascript code. Additionally, you'll create a template code with a reusable component to reuse the custom functionality you create and test your code using an WS server. | ||
|
||
<CodeBlock> | ||
{`asyncapi: 3.0.0 | ||
info: | ||
title: 'Hello, Glee!' | ||
version: 1.0.0 | ||
servers: | ||
websockets: | ||
host: 0.0.0.0:3000 | ||
protocol: ws | ||
channels: | ||
hello: | ||
address: hello | ||
messages: | ||
hello: | ||
$ref: '#/components/messages/hello' | ||
operations: | ||
onHello: | ||
action: receive | ||
channel: | ||
$ref: '#/channels/hello' | ||
SendHello: | ||
action: send | ||
channel: | ||
$ref: "#/channels/hello" | ||
components: | ||
messages: | ||
hello: | ||
payload: | ||
type: string`} | ||
</CodeBlock> | ||
|
||
Let's break it down into pieces: | ||
|
||
<CodeBlock> | ||
{`info: | ||
title: 'Hello, Glee!' | ||
version: 1.0.0`} | ||
</CodeBlock> | ||
|
||
The `info` section provides general information about the API, including its title and version. | ||
|
||
Moving on, let's talk about the `servers` section. | ||
|
||
<CodeBlock> | ||
{`servers: | ||
websockets: | ||
host: 0.0.0.0:3000 | ||
protocol: ws`} | ||
</CodeBlock> | ||
|
||
The servers section defines the different servers where the API can be accessed. In this case, there is a single server named "websockets" that uses the WebSocket protocol (`ws`) and listens on the address `ws://0.0.0.0:3000`. | ||
|
||
Now lets move on to the `channels` section. This section is used to describe the event names your API will be publishing and/or subscribing to. | ||
|
||
<CodeBlock> | ||
{`channels: | ||
hello: | ||
address: hello | ||
messages: | ||
hello: | ||
$ref: '#/components/messages/hello' | ||
operations: | ||
onHello: | ||
action: receive | ||
channel: | ||
$ref: '#/channels/hello' | ||
sendHello: | ||
action: send | ||
channel: | ||
$ref: '#/channels/hello'`} | ||
</CodeBlock> | ||
|
||
The channels section defines the communication channels available in the API. In this case, there's a channel named "hello". This channel supports both sending and receiving. | ||
|
||
The `receive` action indicates that messages received on the `hello` channel should follow the structure defined in the hello message component. | ||
The `send` action specifies that the operation with ID `sendHello` is used for sending messages to the `hello` channel. The message structure is referenced from the hello message component. The message payload is going to be validated against the `sendHello` operation message schemas. | ||
|
||
Next is the `payload` property under `hello` message component which is used to understand how the event should look like when publishing to that channel: | ||
|
||
<CodeBlock> | ||
{`components: | ||
messages: | ||
hello: | ||
payload: | ||
type: string`} | ||
</CodeBlock> | ||
|
||
The components section contains reusable elements, in this case, a definition for the "hello" message. It specifies that the payload of the "hello" message should be of type string. | ||
|
||
## Summary | ||
|
||
In this tutorial, you learned how to create an AsyncAPI specification document via a simple example with a glee template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1429,4 +1429,4 @@ v15.4.0 | |
|
||
#### Defined in | ||
|
||
node_modules/@types/node/events.d.ts:317 | ||
node_modules/@types/node/events.d.ts:317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1650,4 +1650,4 @@ v15.4.0 | |
|
||
#### Defined in | ||
|
||
node_modules/@types/node/events.d.ts:317 | ||
node_modules/@types/node/events.d.ts:317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1537,4 +1537,4 @@ v15.4.0 | |
|
||
#### Defined in | ||
|
||
node_modules/@types/node/events.d.ts:317 | ||
node_modules/@types/node/events.d.ts:317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1678,4 +1678,4 @@ v15.4.0 | |
|
||
#### Defined in | ||
|
||
node_modules/@types/node/events.d.ts:317 | ||
node_modules/@types/node/events.d.ts:317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1561,4 +1561,4 @@ v15.4.0 | |
|
||
#### Defined in | ||
|
||
node_modules/@types/node/events.d.ts:317 | ||
node_modules/@types/node/events.d.ts:317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1998,4 +1998,4 @@ v15.4.0 | |
|
||
#### Defined in | ||
|
||
node_modules/@types/node/events.d.ts:317 | ||
node_modules/@types/node/events.d.ts:317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert the changes to the docs? since this PR is about KAFKA bindings I don't think it's appropriate for it to include any other changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR is old, I had to merge it with the current master branch, so there isn't any change that's not already on the master branch ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oviecodes
If Diff shows there are, then there are changes that this PR is proposing.
for example. master doesn't have this file:
docs/pages/glee-template.md
since it was removed by a previous PR.but you are adding it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh Damn, I'm just pulling from the master branch. I'll try updating from master again, if it doesn't work then I'll scrap this PR, it seems it's too old and things are getting a bit more complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oviecodes yep. I think the problem is that you are pulling from your fork's master instead of this repo's master. happened to me multiple times. 😆