Zum Inhalt

Element <kafka-exporter>

Zweck: Deklariert ein Kafka-Producer-Ziel für generierte Produktströme.

Warum: Verwende dieses Element, um generierte Nachrichten in ein konfiguriertes Kafka-Topic zu veröffentlichen.

Beispiel

1
<kafka-exporter id="orders-out" topic="orders.generated"/>

Entscheidungshilfe

Fachlicher Nutzen: Veröffentlicht generierte Datensätze über einen expliziten Producer-Vertrag in ein Kafka-Topic.

  • Verwenden, wenn

    • Wenn ein generiertes Produkt zu einem begrenzten Strom von Kafka-Records werden muss.
  • Anderen Ansatz wählen, wenn

    • Wenn die Ausgabe ein Dateiartefakt, Datenbankdatensatz oder eine RabbitMQ-Route ist.
  • Voraussetzungen

    • Liefere Broker-Topologie, Topic und deploymentverwaltete Sicherheitseinstellungen.
  • Alternativen

    • Verwende rabbitmq-exporter für AMQP-Routing und Publisher-Confirms. (Siehe: <rabbitmq-exporter>)

Vollständige Beispiele

Eine begrenzte Kafka-Quelle mit Artefakt- und Topic-Ziel verbinden

Verwende getrennte Importer- und Exporter-IDs, damit Konsum und Veröffentlichung unabhängige Verträge mit expliziten Topics bleiben.

kafka-roundtrip/datamimic.xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<setup>
    <kafka-importer id="orders_in"
                    system="kafkaLocal"
                    topic="{kafka_input_topic}"
                    group_id="{kafka_consumer_group}"
                    enable_auto_commit="false"
                    auto_offset_reset="earliest"
                    decoding="UTF-8"/>
    <kafka-exporter id="orders_out"
                    system="kafkaLocal"
                    topic="{kafka_output_topic}"/>
    <generate name="normalized_orders"
              source="orders_in"
              count="10"
              distribution="ordered"
              target="LogExporter,orders_out"/>
</setup>

Regeln und ungültige Kombinationen

I349 — Export Kafka TLS Failed

Kafka TLS/SSL handshake failed for topic '{topic}': {reason}

Warum: Kafka producer failed during TLS/SSL negotiation while exporting records.

Lösung: Verify Kafka TLS certificate paths, key material, and security protocol settings.

Vollständige Regel

I350 — Export Kafka Authentication Failed

Kafka authentication failed for topic '{topic}': {reason}

Warum: Kafka producer credentials were rejected while exporting records.

Lösung: Verify SASL credentials/mechanism and retry with valid authentication settings.

Vollständige Regel

I351 — Export Kafka Authorization Failed

Kafka authorization failed for topic '{topic}': {reason}

Warum: Kafka producer lacks permissions for the configured topic.

Lösung: Grant write permissions for the topic or update ACLs and retry.

Vollständige Regel

I352 — Export Kafka Network Failed

Kafka network connectivity failed for topic '{topic}': {reason}

Warum: Kafka producer could not establish broker connectivity while exporting records.

Lösung: Verify broker hosts/ports, DNS, routing, and firewall configuration.

Vollständige Regel

I353 — Export Kafka Timeout

Kafka operation timed out for topic '{topic}': {reason}

Warum: Kafka producer operation exceeded configured timeout while exporting records.

Lösung: Retry the operation or tune Kafka timeout settings for the environment.

Vollständige Regel

I354 — Export Kafka Topic Not Found

Kafka topic '{topic}' not found or inaccessible: {reason}

Warum: Configured Kafka topic does not exist or cannot be accessed by the producer.

Lösung: Ensure the topic exists and the producer has access to it.

Vollständige Regel

I355 — Export Kafka Write Failed

Kafka write failed for topic '{topic}': {reason}

Warum: Kafka producer encountered an unclassified write failure while exporting records.

Lösung: Inspect broker/client logs and producer configuration, then retry.

Vollständige Regel

Erlaubte Elternelemente / Erlaubte Kindelemente

Erlaubte Elternelemente: else, else-if, if, setup, while

Erlaubte Kindelemente:

Keine

Erweiterungsattribute: Die deklarierten Attribute sind vollständig. Dieses Element akzeptiert zusätzlich laufzeitdefinierte Herstellererweiterungen, für die es bewusst keine statische Completion gibt.

  • Source und Target wählen — Guides users and agents from an input ownership boundary and intended side effect to one bounded source and target contract.

Attribute

Alle 51 Attribute anzeigen

acks

Broker acknowledgement policy: 0, 1, or all replicas.

optional; string; Standardwert: null; Werte: 0, 1, all.

allow_auto_create_topics

Allow the Kafka client to create missing topics when the broker permits it.

optional; boolean; Standardwert: true.

api_version

Kafka protocol version as underscore-separated text or an integer tuple.

optional; string; Standardwert: null.

api_version_auto_timeout_ms

Timeout in milliseconds for automatic broker-version detection.

optional; integer; Standardwert: null.

batch_size

Maximum producer batch size in bytes.

optional; integer; Standardwert: null.

bootstrap_servers

Kafka broker list (host:port).

optional; string.

buffer_memory

Total bytes available to buffer unsent producer records.

optional; integer; Standardwert: null.

client_id

Client identifier reported to Kafka brokers.

optional; string; Standardwert: null.

compression_type

Compression codec applied to producer batches.

optional; string; Standardwert: null; Werte: gzip, snappy, lz4, zstd.

connections_max_idle_ms

Idle time in milliseconds after which a broker connection is closed.

optional; integer; Standardwert: null.

encoding

Optional encoding strategy.

optional; string; Standardwert: null.

environment

Environment label for this exporter.

optional; string; Standardwert: null.

format

Data format.

optional; string; Standardwert: null; Werte: string, json, avro.

id

Kafka exporter ID.

erforderlich; string.

linger_ms

Delay in milliseconds used to collect records into a producer batch.

optional; integer; Standardwert: null.

max_block_ms

Maximum time in milliseconds a producer call may block for metadata or buffer space.

optional; integer; Standardwert: null.

max_in_flight_requests_per_connection

Maximum number of unacknowledged requests per broker connection.

optional; integer; Standardwert: null.

max_request_size

Maximum size in bytes of a producer request.

optional; integer; Standardwert: null.

metadata_max_age_ms

Maximum age in milliseconds of cached broker metadata.

optional; integer; Standardwert: null.

metrics_num_samples

Number of samples retained for Kafka client metrics.

optional; integer; Standardwert: null.

metrics_sample_window_ms

Duration in milliseconds of each Kafka client metrics sample.

optional; integer; Standardwert: null.

partition

Optional zero-based topic partition.

optional; integer; Standardwert: null.

receive_buffer_bytes

TCP receive-buffer size in bytes; use the Kafka client default when omitted.

optional; integer; Standardwert: null.

reconnect_backoff_max_ms

Maximum delay in milliseconds between broker reconnection attempts.

optional; integer; Standardwert: null.

reconnect_backoff_ms

Initial delay in milliseconds before reconnecting to a broker.

optional; integer; Standardwert: null.

request_timeout_ms

Maximum time in milliseconds to wait for a broker request.

optional; integer; Standardwert: null.

retries

Maximum number of retries for a failed producer request.

optional; integer; Standardwert: null.

retry_backoff_ms

Delay in milliseconds before retrying a failed broker operation.

optional; integer; Standardwert: null.

sasl_kerberos_domain_name

Kerberos domain name used by GSSAPI authentication.

optional; string; Standardwert: null.

sasl_kerberos_name

Kerberos principal name used by GSSAPI authentication.

optional; string; Standardwert: null.

sasl_kerberos_service_name

Kerberos service name used by GSSAPI authentication.

optional; string; Standardwert: null.

sasl_mechanism

SASL authentication mechanism.

optional; string; Standardwert: null; Werte: PLAIN, GSSAPI, OAUTHBEARER, SCRAM-SHA-256, SCRAM-SHA-512.

sasl_plain_password

Password for PLAIN or SCRAM authentication.

optional; string; Standardwert: null.

sasl_plain_username

Username for PLAIN or SCRAM authentication.

optional; string; Standardwert: null.

schema

Schema/subject for schema-registry aware payloads.

optional; string; Standardwert: null.

security_protocol

Transport and authentication protocol used for broker connections.

optional; string; Standardwert: null; Werte: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.

send_buffer_bytes

TCP send-buffer size in bytes; use the Kafka client default when omitted.

optional; integer; Standardwert: null.

sock_chunk_buffer_count

Number of socket transfer chunks retained by the Kafka producer.

optional; integer; Standardwert: null.

sock_chunk_bytes

Socket transfer chunk size in bytes used by the Kafka producer.

optional; integer; Standardwert: null.

socket_options

Socket options as a Python literal string or a list accepted by the Kafka client.

optional; string; Standardwert: null.

socks5_proxy

SOCKS5 proxy address used for broker connections.

optional; string; Standardwert: null.

ssl_cafile

Path to the CA certificate file used to verify brokers.

optional; string; Standardwert: null.

ssl_certfile

Path to the client certificate file.

optional; string; Standardwert: null.

ssl_check_hostname

Verify that broker certificates match their host names.

optional; boolean; Standardwert: null.

ssl_cipher_suites

OpenSSL cipher-suite expression used for broker connections.

optional; string; Standardwert: null.

ssl_crlfile

Path to a certificate-revocation-list file.

optional; string; Standardwert: null.

ssl_keyfile

Path to the client private-key file.

optional; string; Standardwert: null.

ssl_password

Password used to decrypt the client private key.

optional; string; Standardwert: null.

ssl_protocol

SSL protocol name passed to the Kafka client.

optional; string; Standardwert: null.

system

System identifier for this exporter.

optional; string; Standardwert: null.

topic

Kafka topic to publish to.

erforderlich; string.