Support Questions

Find answers, ask questions, and share your expertise

Does NiFi preserves order of transactions in a Cluster

avatar
Contributor

Hello All,

Does NiFi preserve order of transactions in a cluster? Is their a way to guarantee that Inserts will be processed before Updates? I can use Kafka Connect with single partition and 3 replicas to ensure HA and Transaction Order. Wondering if their is anyway to achieve this in a NiFi cluster.

Thanks!!

1 ACCEPTED SOLUTION

avatar
Guru

Hi @M R

NiFi can do this. You may want to look at the EnforceOrder processor in the latest NiFi version. In a clustered enviornment, you can have most of your processors distributed throughout the cluster but one of the last processors in the flow could be EnforceOrder, which should be run only on a Primary Node to ensure that the order is maintained. Also, use FIFO prioritization with it.

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.3.0/org.apache...

View solution in original post

2 REPLIES 2

avatar
Guru

Hi @M R

NiFi can do this. You may want to look at the EnforceOrder processor in the latest NiFi version. In a clustered enviornment, you can have most of your processors distributed throughout the cluster but one of the last processors in the flow could be EnforceOrder, which should be run only on a Primary Node to ensure that the order is maintained. Also, use FIFO prioritization with it.

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.3.0/org.apache...

avatar
Master Mentor
@M R

Using a single partition in Kafka is similar to using a single Node in NiFi to maintain order. The enforceOrder processor is a great new addition for enforcing order of FlowFiles, but it will only enforce orders on those FlowFiles that reside on the same node in a NiFi cluster. So if you are trying to enforce processing order of FlowFiles across numerous nodes, this processor will not do that. You would need to get all FlowFiles for which you want to enforce order on to the same node before using this processor.

I don't fully understand you entire use case, but a couple other processor you may want to look at include wait ad notify processors. These are also new in the latest HDF 3.0 and NiFi 1.2.0 releases.

Thanks,

Matt