Skip to main content

cmem-plugin-kafka

Send and receive messages from Apache Kafka.

eccenca Corporate Memory

This is a plugin for eccenca Corporate Memory. You can install it with the cmemc command line client like this:

cmemc admin workspace python install cmem-plugin-kafka

workflow pypi version license poetry ruff mypy copier

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"
      ]
    }
  }
}

Release files for cmem-plugin-kafka 3.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmem-plugin-kafka 3.5.1
File Size Uploaded
cmem_plugin_kafka-3.5.1.tar.gz 22.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmem-plugin-kafka 3.5.1
File Interpreter ABI Platform
cmem_plugin_kafka-3.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.5 kB

Release files / cmem_plugin_kafka-3.5.1.tar.gz

Download URL cmem_plugin_kafka-3.5.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5dd0eea17f9e2f82c27aa78c2219c9450845a2c08256337c96dbe24008c31e9a
BLAKE2b-256 checksum
How to use checksums
5f04bc1c95d3d91b44b75a77d95d98414efe8d489f723d88081b937115ab7c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.13.15 Linux/6.17.0-1022-azure

Release files / cmem_plugin_kafka-3.5.1-py3-none-any.whl

Download URL cmem_plugin_kafka-3.5.1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e703e654a17af9e8a3232c99815958fe8d1dacd58e52dd4cb1bff5eb5f29f46
BLAKE2b-256 checksum
How to use checksums
9f3699ed9a3b916bf762fc171f9952a8fd7f1cdb4c4b9ad35ec4104ab0e17eea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.3 CPython/3.13.15 Linux/6.17.0-1022-azure
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page