5 Struct N_KAFKA_EVENT
gullradriel edited this page 2026-10-09 00:55:18 +02:00

N_KAFKA_EVENT

Module: KAFKA: generic event producer and consumer functions

structure of a KAFKA message

#include "n_kafka.h"

Public Attributes

Name
unsigned int status
state of the event: N_KAFKA_EVENT_CREATED ,N_KAFKA_EVENT_QUEUED , N_KAFKA_EVENT_WAITING_ACK , N_KAFKA_EVENT_ERROR , N_KAFKA_EVENT_OK
int schema_id
kafka schema_id
LIST * received_headers
kafka consume event headers structure handle
rd_kafka_headers_t * rd_kafka_headers
kafka produce event headers structure handle
struct N_KAFKA * parent_table
access lock
char * from_topic
in case of received event, else NULL
N_STR * event_string
string containing the topic id + payload
N_STR * event_files_to_delete
string containing the original event source file name if it is to be deleted when event is produced.
time_t error_time
wall-clock time at which status flipped to N_KAFKA_EVENT_ERROR.

Public Attributes Documentation

variable status

unsigned int status;

state of the event: N_KAFKA_EVENT_CREATED ,N_KAFKA_EVENT_QUEUED , N_KAFKA_EVENT_WAITING_ACK , N_KAFKA_EVENT_ERROR , N_KAFKA_EVENT_OK

variable schema_id

int schema_id;

kafka schema_id

variable received_headers

LIST * received_headers;

kafka consume event headers structure handle

variable rd_kafka_headers

rd_kafka_headers_t * rd_kafka_headers;

kafka produce event headers structure handle

variable parent_table

struct N_KAFKA * parent_table;

access lock

variable from_topic

char * from_topic;

in case of received event, else NULL

variable event_string

N_STR * event_string;

string containing the topic id + payload

variable event_files_to_delete

N_STR * event_files_to_delete;

string containing the original event source file name if it is to be deleted when event is produced.

List separated with ',' else it's NULL

variable error_time

time_t error_time;

wall-clock time at which status flipped to N_KAFKA_EVENT_ERROR.

0 when the event has never errored. Used by the retry logic gated by N_KAFKA::error_timeout.