add support for priority-map-keyfn and priority-map-keyfn-by