Priority between digest message and packet_In

Do you mean you want to have multiple output queues for a single physical output port in the traffic manager, with a packet scheduling algorithm run on those queues to decide which packet is transmitted next, such as a strict priority queue, or weighted fair queueing, etc.?

If so, currently the answer is “it depends upon the target device”. Which target device do you have in mind?

If the BMv2 software switch, there is an option to enable multiple queues per output port, but only if you make a one-line change to the source code and recompile it from source code. Here is an earlier Github issue where this question was asked, and the answer was given for how to change the source code to enable this: Does simple_switch_grpc support priority queue ? · Issue #877 · p4lang/behavioral-model · GitHub

It would be great if someone was willing to enhance BMv2 source code so that multiple queues per port could be enabled with just a command line option, without having to recompile. See here if you are interested in that: Consider making it a command line option to enable priority queues · Issue #1065 · p4lang/behavioral-model · GitHub

If I have completely missed the mark on your question, then I ask you again “prioritize which messages? And prioritize them between which two points of the system?”