channels:
orderAcknowledgement:
description: new Order Acknowledgment
servers:
- anypointMQ
bindings:
anypointmq:
destination: '{env}.amq-asyncapi-poc.orderAcknowledgement'
destinationType: queue
parameters:
env:
$ref: '#/components/parameters/env'
publish:
operationId: listen-order-ack
description: publish a new Order Acknowledgment event to this channel and we will process it
message:
$ref: '#/components/messages/orderAckMessage'
Supported Bindings and Parametrized Channels in APIkit for AsyncAPI
APIkit for AsyncAPI supports various bindings to enable message-driven architectures.
Connector | Publish | Message Listener | Description | Reference |
---|---|---|---|---|
Anypoint Connector for MQ (Anypoint MQ Connector) |
|
|
By default, AnypointMQ Connector uses the channel name as the |
See Anypoint MQ Bindings. |
Solace PubSub+ Connector |
|
|
Solace PubSub+ Connector operates in |
See Solace Bindings. |
|
|
Solace PubSub+ Connector supports |
See Solace Bindings. |
|
N/A |
|
Solace PubSub+ Connector specifies the list of topics the queue subscribes to when the |
See Solace Bindings. |
Anypoint Connector for Apache Kafka (Apache Kafka Connector) and Solace PubSub+ Connector don’t support bindings. |
Parameterized Channels
APIkit for AsyncAPI supports parametrized channels so you can define dynamic and reusable configurations, scale your integrations more effectively, and create consistent configurations across different parts of the integration.
APIkit for AsyncAPI doesn’t support parameters if they’re defined in a binding. For example, a destination
in AnypointMQ.
The following code provides a partial API spec example with a parameterized destination
:
You must set the parametrized channel at design time. You can’t set the parametrized channel at runtime.
See the complete API example using parametrized channels:
asyncapi: '2.6.0' info: title: AMQ-AsyncAPI-PoC version: '1.0.11' description: Proof of Concept for Anypoint MQ AsyncAPI interface contact: name: Example Company email: address@example.com tags: - name: WMS description: Warehouse Management System - name: PoC description: Proof of Concept - name: Order Acknowledgement servers: anypointMQ: url: https://{region}.anypoint.mulesoft.com/api/{version}/organizations/{organizationId}/environments/{environmentId} protocol: anypointmq protocolVersion: v1 description: The Anypoint MQ broker variables: region: $ref: '#/components/serverVariables/region' version: $ref: '#/components/serverVariables/version' organizationId: $ref: '#/components/serverVariables/organizationId' environmentId: $ref: '#/components/serverVariables/environmentId' channels: orderAcknowledgement: description: new Order Acknowledgment servers: - anypointMQ bindings: anypointmq: destination: '{env}.amq-asyncapi-poc.orderAcknowledgement' destinationType: queue parameters: env: $ref: '#/components/parameters/env' publish: operationId: listen-order-ack description: publish a new Order Acknowledgment event to this channel and we will process it message: $ref: '#/components/messages/orderAckMessage' components: parameters: env: description: The Mule runtime environment schema: type: string enum: - dev - tst - acc - prd default: tst serverVariables: region: description: The CloudHub region where the endpoint is situated enum: - mq-eu-west-1 default: mq-eu-west-1 version: description: The version of the Anypoint MQ API enum: - v1 default: v1 organizationId: description: The identifier of our organization (business group) enum: - 7a2b1c3d-4e5f-6g7h-8i9j-0k1l2m3n4o5p environmentId: description: The identifier of the runtime environment within the organization enum: - a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p - b2c3d4e5-6f7g-8h9i-0j1k-2l3m4n5o6p - c3d4e5f6-7g8h-9i0j-1k2l-3m4n5o6p default: a1b2c3d4-5e6f-7g8h-9i0j-1k2l3m4n5o6p messages: orderAckMessage: name: OrderAckMessage description: An order acknowledgment message. payload: $ref: 'schemas/orderAcknowledgement.json'
APIkit for AsyncAPI uses the parametrized channels only on listeners .
|