c api: producer_t and comsumer_t