Skip to main content

Send and receive messages from Apache Kafka.

Project description

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

Project details


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.4.2.tar.gz (21.6 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.4.2-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cmem_plugin_kafka-3.4.2.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.13 Linux/6.17.0-1010-azure

File hashes

Hashes for cmem_plugin_kafka-3.4.2.tar.gz
Algorithm Hash digest
SHA256 c53855731f444040ff3991732cc7100d58c1adf5275948b9e3a683a9ddc5b4b6
MD5 8ef5fafa644403f9ca72c29070d4c19b
BLAKE2b-256 18c619cb81a07e4d9c7edef4bf5885b0263d1c46ca6192444cf54285c303f2ab

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cmem_plugin_kafka-3.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0de2a9b36eaa995d36a929eb7e9bc2e3a2b3320687db0a37069694af66ab8b
MD5 b651f3850110cda57ac6139394e166be
BLAKE2b-256 da9320b1c79e358acc3380a6cd57c226da49a0f5a550abfe9d337580f8859707

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page