-
Notifications
You must be signed in to change notification settings - Fork 166
Closed
Labels
area: examplesarea: specChanges in the SpecificationChanges in the Specificationchange: breakingA breaking change that will impact in a major version change.A breaking change that will impact in a major version change.change: documentationImprovements or additions to documentation. It won't impact a version change.Improvements or additions to documentation. It won't impact a version change.change: featureNew feature or request. Impacts in a minor version changeNew feature or request. Impacts in a minor version changechange: fixSomething isn't working. Impacts in a minor version change.Something isn't working. Impacts in a minor version change.type: feature
Milestone
Description
What would you like to be added?
Redefine AsyncAPI call, which is missing crucial properties to make it work as expected
Proposal(s):
Properties
| Name | Type | Required | Description |
|---|---|---|---|
| document | externalResource |
yes |
The AsyncAPI document that defines the operation to call. |
| channel | string |
yes |
The name of the channel on which to perform the operation. The operation to perform is defined by declaring either message, in which case the channel's publish operation will be executed, or subscription, in which case the channel's subscribe operation will be executed.Used only in case the referenced document uses AsyncAPI v2.6.0. |
| operation | string |
yes |
A reference to the AsyncAPI operation to call. Used only in case the referenced document uses AsyncAPI v3.0.0. |
| server | serverDefinition |
no |
An object used to configure to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel. |
| protocol | string |
no |
The protocol to use to select the target server. Ignored if server has been set.Supported values are: amqp, amqp1, anypointmq, googlepubsub, http, ibmmq, jms, kafka, mercure, mqtt, mqtt5, nats, pulsar, redis, sns, solace, sqs, stomp and ws |
| message | messageDefinition |
no |
An object used to configure the message to publish using the target operation. Required if subscription has not been set. |
| subscription | subscriptionDefinition |
no |
An object used to configure the subscription to messages consumed using the target operation. Required if message has not been set. |
| authentication | stringauthentication |
no |
The authentication policy, or the name of the authentication policy, to use when calling the AsyncAPI operation. |
Examples
Publish
call: asyncapi
with:
document:
endpoint: https://fake.com/docs/asyncapi.json
operation: greet
server:
name: greetingsServer
variables:
environment: dev
message:
payload:
greetings: Hello, World!
headers:
foo: bar
bar: bazSubscribe
call: asyncapi
with:
document:
endpoint: https://fake.com/docs/asyncapi.json
operation: chat-inbox
protocol: http
subscription:
correlation: ${ . == $workflow.input.chat.roomId }
consume:
amount: 5
for:
seconds: 10
while: ${ ($context.messages | length) < 5 }
until: ${ ($context.messages | length) == 5 }AsyncAPI Server Definition
| Name | Type | Required | Description |
|---|---|---|---|
| server.name | string |
yes |
The name of the server to call the specified AsyncAPI operation on. |
| server.variables | object |
no |
The target server's variables, if any. |
AsyncAPI Message Definition
| Name | Type | Required | Description |
|---|---|---|---|
| message.payload | object |
no |
The message's payload, if any. |
| message.headers | object |
no |
The message's headers, if any. |
AsycnAPI Subscription Definition
| Name | Type | Required | Description |
|---|---|---|---|
| subscription.correlation | string |
no |
A runtime expression, if any, used to filter consumed messages based on their correlation id.. |
| subscription.consume | subscriptionLifetimeDefinition |
yes |
An object used to configure the subscription's lifetime. |
| subscription.consume.amount | integer |
no |
The amount of messages to consume. Required if while and until have not been set. |
| subscription.consume.for | duration |
no |
The duration that defines for how long to consume messages. |
| subscription.consume.while | string |
no |
A runtime expression, if any, used to determine whether or not to keep consuming messages. Required if amount and until have not been set. |
| subscription.consume.until | string |
no |
A runtime expression, if any, used to determine until when to consume messages. Required if amount and while have not been set. |
Alternative(s):
No response
Additional info:
No response
Community Notes
- Please vote by adding a 👍 reaction to the feature to help us prioritize.
- If you are interested to work on this feature, please leave a comment.
Metadata
Metadata
Assignees
Labels
area: examplesarea: specChanges in the SpecificationChanges in the Specificationchange: breakingA breaking change that will impact in a major version change.A breaking change that will impact in a major version change.change: documentationImprovements or additions to documentation. It won't impact a version change.Improvements or additions to documentation. It won't impact a version change.change: featureNew feature or request. Impacts in a minor version changeNew feature or request. Impacts in a minor version changechange: fixSomething isn't working. Impacts in a minor version change.Something isn't working. Impacts in a minor version change.type: feature
Type
Projects
Status
Done