camunda-community-hub / zeebe-kafka-exporter

Export events from Zeebe to Kafka
Apache License 2.0
36 stars 27 forks source link

how to add variables into messages from topic zeebe-process-instance #386

Open eyesmoker opened 7 months ago

eyesmoker commented 7 months ago

I have a requirement to know at what time users are entering workflows and exiting them, capture it in database. I have user_id variable that is sent when creating the process instance. When I inspect zeebe-process-instance kafka topic, I dont see the variable coming.Am I missing any configuration in exporter yaml?

Note: I can see them in zeebe-variable topic but I have to do additional processing in kafka consumer. So, trying to avoid it and see if there is a better way.

{"partitionId":2,"value":{"processDefinitionKey":2251799816253646,"processInstanceKey":4503599629934205,"tenantId":"","elementId":"Process_1f1f2a6","bpmnProcessId":"Process_1f1f2a6","bpmnElementType":"PROCESS","flowScopeKey":-1,"bpmnEventType":"UNSPECIFIED","parentProcessInstanceKey":-1,"parentElementInstanceKey":-1,"version":7},"key":4503599629934205,"timestamp":1704962900608,"valueType":"PROCESS_INSTANCE","brokerVersion":"8.3.4","recordType":"EVENT","sourceRecordPosition":5129600,"intent":"ELEMENT_ACTIVATING","rejectionType":"NULL_VAL","rejectionReason":"","authorizations":{"authorized_tenants":[""]},"recordVersion":1,"position":5129604}

{"partitionId":2,"value":{"processDefinitionKey":2251799816253646,"processInstanceKey":4503599629934205,"tenantId":"","elementId":"Process_1f1f2a6","bpmnProcessId":"Process_1f1f2a6","bpmnElementType":"PROCESS","flowScopeKey":-1,"bpmnEventType":"UNSPECIFIED","parentProcessInstanceKey":-1,"parentElementInstanceKey":-1,"version":7},"key":4503599629934205,"timestamp":1704962915899,"valueType":"PROCESS_INSTANCE","brokerVersion":"8.3.4","recordType":"EVENT","sourceRecordPosition":5129701,"intent":"ELEMENT_COMPLETED","rejectionType":"NULL_VAL","rejectionReason":"","authorizations":{"authorized_tenants":[""]},"recordVersion":1,"position":5129715}

Appreciate your help.

Thanks