Just like we have PROC_SIPRPC, maybe we should have PROC_GENERICWORKER. The PROC_GENERICWORKER could be an alias to PROC_SIPRPC and then all workers should be initialized with the same rank and there will be no hard coding (the +1).
I tested this and it's working. My initial test was done with modparam("kazoo", "pua_mode", 0) and it didn't catch the db non initialization issue of the "AMQP Consumer Worker" .
Also, having the new PROC_GENERICWORKER would solve all the other hardcoded places in other modules.