ReciveTask autocomplete (may be a bug)


#1

Hi.
I have a process with two states:


If I make more than 1 instance, my ReciveTask completed automatic, but I whant to complete my task by REST. In the first (first process instance) time it works as I excpect, but other times it completle automatic (repeat again =) ). Is it a bug? Or else I don’t understand this logic.


#2

Hey @slava.aleferov,

this behavior is expected and is due to the zeebe message buffering mechanism.

Each message has a specific time to live. This means if you create a new worfklow instance
and the message was already published and was not deleted yet, since the TTL is not expired
it will be correlated to the receive task immediately.

You can find more information about this in the docs in the Message Correlation section.

Hope this helps.

Greets
Chris


#3

how can I ensure that a message only consumed by one workflow instance?


#4

Hi @iris,

you could use a different correlation key.
To disable the buffering you could simply publish a message with a zero TTL.

Greets
Chris


#5

got it
thank you


#6

Cool, it’s work. And how I can delete already deployed message without TTL?


#7

I’m not sure whether I understand your question.
What do you mean with deployed message? The published message will be deleted if the TTL expires.
If you publish a message with the Java Client without a specific TTL then a default TTL is used. You can find the default value in the client configuration.

Hope that helps?

Greets
Chris


#8

Yes, that’s what i meant, thanks