Send and receive messages from Apache Kafka.
Project description
cmem-plugin-kafka
Send and receive messages from Apache Kafka.
This is a plugin for eccenca Corporate Memory.
You can install it with the cmemc command line clients like this:
cmemc admin workspace python install cmem-plugin-kafka
Plugin supported message format
XML dataset format
An example XML document is shown below. This document will be sent as two messages to the configured topic. Each message is created as a proper XML document.
<?xml version="1.0" encoding="utf-8"?>
<KafkaMessages>
<Message>
<PurchaseOrder OrderDate="1996-04-06">
<ShipTo country="string">
<name>string</name>
<street>string</street>
<city>string</city>
<state>string</state>
<zip>9200</zip>
</ShipTo>
<BillTo country="string">
<name>string</name>
<street>string</street>
<city>string</city>
<state>string</state>
<zip>2381</zip>
</BillTo>
</PurchaseOrder>
</Message>
<Message key="1234">
<SingleTagHere>
.
.
.
</SingleTagHere>
</Message>
</KafkaMessages>
Producer plugin generates 2 messages with below content
<?xml version="1.0" encoding="utf-8"?>
<PurchaseOrder OrderDate="1996-04-06">
<ShipTo country="string">
<name>string</name>
<street>string</street>
<city>string</city>
<state>string</state>
<zip>9200</zip>
</ShipTo>
<BillTo country="string">
<name>string</name>
<street>string</street>
<city>string</city>
<state>string</state>
<zip>2381</zip>
</BillTo>
</PurchaseOrder>
<?xml version="1.0" encoding="utf-8"?>
<SingleTagHere>
.
.
.
</SingleTagHere>
JSON Dataset format
An example JSON document is shown below. This document will be sent as two messages to the configured topic. Each message is created as a proper JSON document.
[
{
"message": {
"key": "818432-942813-832642-453478",
"headers": {
"type": "ADD"
},
"content": {
"location": [
"Leipzig"
],
"obstacle": {
"name": "Iron Bars",
"order": "1"
}
}
}
},
{
"message": {
"key": "887428-119918-570674-866526",
"headers": {
"type": "REMOVE"
},
"content": {
"comments": "We can pass any json payload here."
}
}
}
]
Producer plugin generates 2 messages with below content
{
"location": [
"Leipzig"
],
"obstacle": {
"name": "Iron Bars",
"order": "1"
}
}
{
"comments": "We can pass any json payload here."
}
Entities format
Random values plugin entities will generate below format JSON document.
{
"schema": {
"type_uri": "https://example.org/vocab/RandomValueRow"
},
"entity": {
"uri": "urn:uuid:3c68d8e7-bf17-4045-a9eb-c9c9813f717f",
"values": {
"<https://example.org/vocab/RandomValuePath0>": [
"a8o4Ocsb6RZClFRUZU3b2w"
],
"<https://example.org/vocab/RandomValuePath1>": [
"RTICRU7JcTUVn94decelPg"
],
"<https://example.org/vocab/RandomValuePath2>": [
"A9r-969NjAlX0DNWftxKoA"
],
"<https://example.org/vocab/RandomValuePath3>": [
"FygWRy1UJ4-IzIim1qukJA"
],
"<https://example.org/vocab/RandomValuePath4>": [
"AJcbn-LJEs-Dif96xu2eww"
]
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cmem_plugin_kafka-3.2.0.tar.gz
.
File metadata
- Download URL: cmem_plugin_kafka-3.2.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54422128c63006b5f2dd7e3a96bda01e89166ba6f4913f451831d37ed82ffb59 |
|
MD5 | 8400018a890a783942625079a94f7d40 |
|
BLAKE2b-256 | f5f4e3e05cd4adfd1f9cf5ef40749539203c6445e1f232ad63b7b8d1d0bc78c4 |
File details
Details for the file cmem_plugin_kafka-3.2.0-py3-none-any.whl
.
File metadata
- Download URL: cmem_plugin_kafka-3.2.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e9e21981c85b3d0cb12822333e87f955063fea1ff0e973d3306416dd80f1576 |
|
MD5 | f789fbc61543622997187e6586200d49 |
|
BLAKE2b-256 | e820a508730b3b1896e707a7f1de94a0a83ce3cb8c79498496a5917904a8b461 |