Does gRPC-java supports http2-stream-priority?
If yes, How to use it? Is there an example?
No. Java will actually follow any priority today if the other side sends it, but provides no way to send it. That isn't a guarantee, we could swap to turning that off at any point. I know also that C core doesn't observe priority and I don't think Go does either. Multiple of us wouldn't be surprised to see it later, but it is still unclear how many users would use it and what their use cases are. We are pretty certain anything we expose wouldn't be as powerful as HTTP/2, because it would make a really poor API.
What is your use case?
I read the http2-spec about the StreamPriority mechanism, I think it will be pretty complicate to implement it. So I wondered how gRPC deal with it.
It is complicate to implement, and there isn't yet a good way to expose it. Its also slightly more computationally expensive to implement so we leave it alone currently.