You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR
I need to run HTTP decoder on a request and I then add pipeline accordingly, if the decoder succeeded or ffailed.
I am using embedded channel to run the handler without modifying my pipeline.
Is this the correct way to determine the request protocol? Note: I'll run more than 1 decoder on the request, it can be multiple protocols (3 or more).
My colleagures told me that using embedded channel will write the request twice and is not memory efficient, because of writeInbound(msg) where msg is my current buffer. Is that true?
I want to run decoder, catch if failed, then run next decoder, catch if fails, and so on.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
TL;DR
I need to run HTTP decoder on a request and I then add pipeline accordingly, if the decoder succeeded or ffailed.
I am using embedded channel to run the handler without modifying my pipeline.
Is this the correct way to determine the request protocol? Note: I'll run more than 1 decoder on the request, it can be multiple protocols (3 or more).
My colleagures told me that using embedded channel will write the request twice and is not memory efficient, because of
writeInbound(msg)
wheremsg
is my current buffer. Is that true?I want to run decoder, catch if failed, then run next decoder, catch if fails, and so on.
Example code (my current solution):
https://github.com/ShlomiRex/netty-multiplex-two-protocols/blob/e83f83c3bf4643c139468406a016ecb5244fabae/src/main/java/handlers/ProtocolHandler.java#L20
Beta Was this translation helpful? Give feedback.
All reactions