Thanks @philipp.ossler .
It is a bit difficult to show all my code. The zeebe code is embedded in a custom Nifi processor written in java, but essentially, this is what is happening with zeebee:
private ZeebeClient client;
client = ZeebeClient.newClientBuilder()
logger.debug(String.format("Workflow path: %s", workFlowPathString));
logger.debug(String.format("Zeebe connection url: %s", zeebeConnUrl));
final DeploymentEvent deployment = client.newDeployCommand()
int workflowVersion = deployment.getWorkflows().get(0).getVersion();
logger.debug(String.format("Deployed workflow version: %d", workflowVersion));
// logger.info(String.format("Successfully created zeebe workflow instance and data variable name: %s", dataVariableName));
final Map<String, Object> data = new HashMap<>();
So, essentially, I am deploying a workflow with a given url and then publish a message with a variable string called data.
My issue is now that when I set timeToLive > 0, I get multiple instances created, which I think is not what I want right? Because it does not let me aggregate multiple messages together as they are have their own seperate instances.
When I let timeToLive = 0, only one instance is deployed, but only one message goes through out of multiple messages.
Also, the message start event bpmn icon only has message Name field, but no correlation field.
Any idea why this is happening?