Skip to content

Instantly share code, notes, and snippets.

@ponelat
Created May 16, 2022 10:55
Show Gist options
  • Save ponelat/8234f2d5667f647344b89ad189452d5a to your computer and use it in GitHub Desktop.
Save ponelat/8234f2d5667f647344b89ad189452d5a to your computer and use it in GitHub Desktop.
AsyncAPI - Avro example
asyncapi: 2.4.0
info:
title: Avro Example
version: 1.0.0
description: |-
An Avro example
channels:
'tweets':
description: This is the firehose of all Tweets
publish:
summary: Just spit out tweets.
operationId: spamTweets
message:
name: tweets
title: Tweets
tags:
- name: Twitter
schemaFormat: application/vnd.apache.avro+yaml;version=1.9.0
payload:
type: record
name: twitter_schema
namespace: com.example.avro
fields:
- name: username
type: string
doc: Name of the user account on Twitter
- name: tweet
type: string
doc: The content of the user's Tweet
- name: timestamp
type: long
doc: Unix epoch time in seconds
doc: A basic schema for Tweets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment