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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmem_plugin_kafka-3.5.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmem_plugin_kafka-3.5.0-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file cmem_plugin_kafka-3.5.0.tar.gz.

File metadata

  • Download URL: cmem_plugin_kafka-3.5.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.15 Linux/6.17.0-1022-azure

File hashes

Hashes for cmem_plugin_kafka-3.5.0.tar.gz
Algorithm Hash digest
SHA256 30e6422901e71c6f22cbc7aa803dacaecd1b0c42c14a5cdf01fd19543175e395
MD5 84fafd3671f2c4254a8adc0847ba1c56
BLAKE2b-256 54c13ada79b3afbd83e916c55ebf9eb8b09f417b1653f8fea21ff9cba2d11bc1

See more details on using hashes here.

File details

Details for the file cmem_plugin_kafka-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: cmem_plugin_kafka-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.15 Linux/6.17.0-1022-azure

File hashes

Hashes for cmem_plugin_kafka-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c31833fae53f86afc85525148c6cb6c2db68b16b6766b1dfa401c4e33d62a328
MD5 7f439b290975c95754225f85274d7fc5
BLAKE2b-256 875d93267fdbc537278011659017a000ff9644eede3f34b78a3bfccdfe5a1b73

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.5.0 This release

2 files

3.4.2

2 files

3.4.1

2 files

3.4.0

2 files

3.3.0

2 files

3.2.0

2 files

3.1.0

2 files

3.0.0

2 files

2.0.0

2 files

1.3.0

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

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