Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add this to an existing Netty application pipeline? #94

Closed
fatso83 opened this issue Jan 19, 2021 · 1 comment
Closed

How to add this to an existing Netty application pipeline? #94

fatso83 opened this issue Jan 19, 2021 · 1 comment

Comments

@fatso83
Copy link

fatso83 commented Jan 19, 2021

The example code shows how to set this up from scratch, but I am a bit unsure of how to convert this

NettyHttpService service = NettyHttpService.builder("Name_of_app")
                          .setPort(7777)
                          .setHttpHandlers(handlers)
                          .build();

into code that works with our existing setup of handlers. Are all these HttpHandlers also "normal" Netty ChannelHandlers I could add to a Netty ChannelPipeline or do they need to be handled specially?

@fatso83
Copy link
Author

fatso83 commented Jan 21, 2021

Got this working with our existing setup by reading your source code and finding out how your NettyHttpService is setup. The relevant section is here https://github.com/cdapio/netty-http/blob/v1.5.0/src/main/java/io/cdap/http/NettyHttpService.java#L351-L357

This might be useful for a lot of people with existing Netty setups, so I would consider adding some tips to your README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant