Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Overview of AsyncAPI Specification Objects

Servers
  The Servers object is a mandatory component and must define some properties such as host, port, protocol, and so on as default. There can be multiple server objects defined in the application. However, TIBCO BusinessEvents considers only default server properties and exports the server specification into the default server.
Channels Object
  Channels are the sender and receiver of messages, managed by a server. Channels contain the relative location to the server, the destination in a TIBCO BusinessEvents application, and the expected message format.
Components Object
  Components are reusable objects to represent various AsyncAPI specifications characteristics and must be explicitly referenced from outside the component object. Components object contains `messages` and `schemas`.

For details about all AsyncAPI objects, see AsyncAPI documentation.

## Sample AsyncAPI Specification

The following is an AsyncAPI specification example for the Streetlights Kafka API:

    {
        "asyncapi": "2.1.0",
        "info": {
            "title": "Streetlights Kafka API",
            "version": "1.0.0",
            "description": "The Smartylighting Streetlights API allows you to remotely manage the city lights",
            "license": {
                "name": "Apache 2.0",
                "url": "https://www.apache.org/licenses/LICENSE-2.0"
            }
        },
        "servers": {
            "default": {
                "url": "test.mykafkacluster.org:8092",
                "protocol": "kafka",
                "protocolVersion": "1.0.0",
                "description": "Test broker"
            }
        },
        "defaultContentType": "application/json",
        "channels": {
            "lightingMeasured": {
                "description": "The topic on which measured values may be produced and consumed.",
                "subscribe": {
                    "summary": "Inform about environmental lighting conditions of a particular streetlight.",
                    "operationId": "receiveLightMeasurement",
                    "message": {
                        "$ref": "#/components/messages/lightMeasured"
                    }
                }
            }
        },
        "components": {
            "messages": {
                "lightMeasured": {
                    "name": "lightMeasured",
                    "title": "Light measured",
                    "summary": "Inform about environmental lighting conditions of a particular streetlight.",
                    "contentType": "application/json",
                    "payload": {
                        "$ref": "#/components/schemas/lightMeasuredPayload"
                    }
                }
            },
            "schemas": {
                "lightMeasuredPayload": {
                    "type": "object",
                    "properties": {
                        "lumens": {
                            "type": "integer",
                            "description": "Light intensity measured in lumens."
                        },
                        "sentAt": {
                           "type": "string",
                            "format": "date-time",
                            "description": "Date and time when the message was sent."
                        }
                    }
                }
            }
        }
    }

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.