Streaming messages from RabbitMQ into Kafka with Kafka Connect
Analysing network behaviour with ksqlDB and MongoDB
Detecting and Analysing SSH Attacks with ksqlDB
A poor man’s KSQL EXPLODE/UNNEST technique
There is an open issue for support of EXPLODE
/UNNEST
functionality in KSQL, and if you need it then do up-vote the issue. Here I detail a hacky, but effective, workaround for exploding arrays into multiple messages—so long as you know the upper-bound on your array.
Pivoting Aggregates in Ksql
Prompted by a question on StackOverflow, the requirement is to take a series of events related to a common key and for each key output a series of aggregates derived from a changing value in the events. I’ll use the data from the question, based on ticket statuses. Each ticket can go through various stages, and the requirement was to show, per customer, how many tickets are currently at each stage.
Connecting KSQL to a Secured Schema Registry
Confluent Cloud now includes a secured Schema Registry, which you can use from external applications, including KSQL.
To configure KSQL for it you need to set:
ksql.schema.registry.url=https://<Schema Registry endpoint>
ksql.schema.registry.basic.auth.credentials.source=USER_INFO
ksql.schema.registry.basic.auth.user.info=<Schema Registry API Key>:<Schema Registry API Secret>
Exploring KSQL Stream-Stream Joins
Introduction
What can you use stream-stream joins for? Can you use them to join between a stream of orders and stream of related shipments to do useful things? What’s not supported in KSQL, where are the cracks?
Terminate All KSQL Queries
Before you can drop a stream or table that’s populated by a query in KSQL, you have to terminate any queries upon which the object is dependent. Here’s a bit of jq
& xargs
magic to terminate all queries that are currently running
How KSQL handles case
KSQL is generally case-sensitive. Very sensitive, at times ;-)
KSQL REST API cheatsheet
Full reference is here