Skip to content

Instantly share code, notes, and snippets.

@dalelane
dalelane / docker-compose.yaml
Created December 23, 2022 16:15
running development instance of IBM Event Streams using Docker Compose
version: "3"
services:
zookeeper:
platform: linux/amd64
image: cp.icr.io/cp/ibm-eventstreams-kafka:11.1.2
container_name: zookeeper
hostname: zookeeper
command:
[
@dalelane
dalelane / asyncapi-eda.yaml
Created April 3, 2022 12:19
sample AsyncAPI specification for describing a Kafka application
asyncapi: 2.3.0
# ---
id: 'urn:dalelane:stock-level-events'
# ---
info:
title: Stock level events
@dalelane
dalelane / setup-eem-truststore.sh
Last active October 12, 2023 07:39
set up a truststore for Kafka clients connecting to the Event Gateway in Event Endpoint Management (using the keystore retrieved from the API Manager)
# -------------------------------------------------------------------
# update these to match your Event Endpoint Management instance
# -------------------------------------------------------------------
NAMESPACE=eventendpointmanagement
INSTANCE=eem
echo "\n\033[1;33m getting SSL/TLS details for Event Gateway in...\033[0m"
echo "namespace : $NAMESPACE"
echo "instance : $INSTANCE"
@dalelane
dalelane / setup-eem-truststore.sh
Last active November 22, 2021 12:07
set up a truststore for Kafka clients connecting to the Event Gateway in Event Endpoint Management (using the cert presented by the gateway)
# -------------------------------------------------------------------
# update these to match your Event Endpoint Management instance
# -------------------------------------------------------------------
NAMESPACE=eventendpointmanagement
INSTANCE=eem
echo "\n\033[1;33m getting SSL/TLS details for Event Gateway in...\033[0m"
echo "namespace : $NAMESPACE"
echo "instance : $INSTANCE"
asyncapi: 2.0.0
# ---
id: 'urn:dalelane:stock-level-events'
# ---
info:
title: Stock level events
{
"type": "record",
"namespace": "co.uk.dalelane",
"name": "TemperatureReading",
"fields": [
{
"name": "warehouse",
"type": {
"type": "enum",
"name": "Warehouse",
@dalelane
dalelane / proposal.md
Last active September 20, 2023 02:50
Describing Kafka schema usage using AsyncAPI
@dalelane
dalelane / asyncapi-kafka.yaml
Created November 27, 2020 11:57
Kafka spec in AsyncAPI
asyncapi: '2.0.0'
id: 'urn:some:unique:id'
info:
title: The whole spec
...
servers:
nameofmycluster:
url: someaddress:port
protocol: kafka-secure
security:
@dalelane
dalelane / asyncapi-avro-url.yaml
Created November 27, 2020 11:53
Avro URL reference in asyncapi
asyncapi: '2.0.0'
...
channels:
my.topic.name:
...
subscribe:
...
message:
...
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
@dalelane
dalelane / asyncapi-avro-file.yaml
Created November 27, 2020 11:51
Avro file reference in asyncapi
asyncapi: '2.0.0'
...
channels:
my.topic.name:
...
subscribe:
...
message:
...
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'