Hey @triptesh , when you first create the flow, it is ALWAYS in the inactive state.
That way, when you get an active indication, you know it has transitioned from inactive to active.
Thinking about your k8s problem, maybe the way to approach this is have all pods bind to all queues. When they get the first active flow indication from one of the queues, they unbind from all the other queues. That way fairly quickly all get one queue as active. You’d still need some form of timeout to guard for error conditions.
Example operation:
Pod 1 starts and binds to all 4 queues. It gets an active flow indication for all 4 queues. It gets the AFI for queue 3 first, so it unbinds from queues 1, 2 and 4. Pod 4 starts next and binds to all 4 queues. It gets AFI for queues 1, 2 and 4, with 1 first. It unbinds from 2 & 4. Pod 2 starts next, binds to all 4 queues. It gets AFI for queues 2 & 4, and unbinds from 2. Pod 3 start last, binds to all 4 queues. If gets ADI for queue 2.