Destination
Supported Bindings and Parametrized Channels in APIkit for AsyncAPI
APIkit for AsyncAPI supports various bindings to enable message-driven architectures, and parametrized channels to define dynamic and reusable configurations.
Supported Bindings
Anypoint Connector for MQ (Anypoint MQ Connector)
Binding | Publish | Message Listener | Description | Reference |
---|---|---|---|---|
|
|
|
See Anypoint MQ Bindings. |
|
|
|
|
Type of destination (queue or exchange, or FIFO queue). It’s optional and defaults to
|
Kafka Connector
Binding | Publish | Message Listener | Description | Reference |
---|---|---|---|---|
|
|
|
Key associated with the message in this channel. It’s optional and defaults to |
See Kafka bindings. |
Solace PubSub+ Connector
Binding | Publish | Message Listener | Description | Reference |
---|---|---|---|---|
|
|
|
Solace PubSub+ Connector operates in |
See Solace bindings. |
|
|
|
Solace PubSub+ Connector supports |
|
|
N/A |
|
Solace PubSub+ Connector specifies the list of topics the queue subscribes to when the |
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.
This code provides a partial API spec example with a parameterized destination
:
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'
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 .
|