This guide focuses on creating a Kafka producer using Spring Boot.
application.yml
or application.properties
file:
Header | Purpose | Consequences If Missing |
---|---|---|
fxContext | Identifies the target process/subprocess in the hierarchy | Messages may be incorrectly routed or not processed |
Fx-AppId | Identifies the application processing the message | Application context may be lost |
Fx-RootAppId | Identifies the original application that initiated the process chain | Process origin tracking may be lost; important for complex process hierarchies |
Fx-BuildId | Contains the build identifier for versioning and traceability | Version-specific behaviors may be affected; debugging becomes more difficult |
processInstanceId /processInstanceUuid | Primary keys for message correlation | Message correlation may fail |
Fx-ProcessName | Required for cross-process communication | ”Start another process via Kafka” functionality may break |
fxContext
header is particularly important for routing messages in architectures with embedded processes and subprocesses:
fxContext = "main"
fxContext = "main:4"
fxContext = "main:4:12"
Fx-RootAppId
header is used to track the originating application throughout the entire process chain. This is particularly important when:
Fx-AppId
which may change as a message passes through different components, Fx-RootAppId
preserves the original initiator’s identity.