Message Start Event - Consuming message from message broker such as RabbitMQ

Does Flowable have the ability to consume a message from a message broker such as RabbitMQ. Most of what I have found points to having to do this ourselves. Essentially, we would need to implement a message listener and call the runtime service [runtimeService.startProcessInstanceByMessage(messageName)] to publish a message within the Flowable infrastructure. Before proceeding, I wanted to confirm that there was no easier way to do this as this is behaviour I was expecting to be present within the product.

Thanks in advance for the help,


Hi Stephane,

Apache Camel, Spring Integration or Mule provide this kind of integration points out of the box, so that’s why we just provide an integration point with these frameworks. For Apache Camel you could consume the message and then start a new process instance in Flowable using a Camel route. You can have a look at the docs here

Best regards,


Hi Tijs,

Thanks for the reply. I was off working on something for a little bit and I’m coming back to this. I managed to get the functionality in place to use Apache Camel. The question I’m asking myself is how do I start a process and pass in process variables that are read from the message on the queue.

Here is the way I had gotten it to work without Camel:

    @RabbitListener(queues = "${ams.rabbitmq.caseCreated}", containerFactory = "amsFactory")
public void receiveMessageCaseCreate(CaseCreatedEvent msg) {

	Map<String, Object> processVariables = new HashMap<String, Object>();
	processVariables.put("caseId", msg.getCaseId());
	runtimeService.startProcessInstanceByMessage("caseCreatedMessage", processVariables);

Using Camel, I’ve setup the following route:


The documentation describes how to set a header for the process initiator:
.setHeader(“CamelProcessInitiatorHeader”, constant(“kermit”))

Is there a way to set a header for process variables?



You can influence how/if camel headers/body/exchangeProperties are mapped process variables, for example if you use:

    .setHeader(“ProcessVariableA”, constant(“ValueA”))
    .setHeader(“ProcessVariableB”, constant(“ValueB”))

“ProcessVariableA” and “ProcessVariableB” will be available in the process as variables.

See section starting with “The following table provides an overview of three available Camel behaviors:” for more details.