Stream corruption with multiple producers -> SOLVED

Luis Neves luis.neves at gmail.com
Mon Dec 28 08:39:47 EST 2009


On Mon, Dec 28, 2009 at 12:00 PM, "Trustin Lee (이희승)" <trustin at gmail.com> wrote:
> Hi Luis and Shay,
>
> Did you find the current documentation confusing about setting up the
> pipeline?


Not really... In my eagerness to quickly have something working I've
only glanced trough the documentation... I've read the paragraph:

"However, as your application gets more and more complex, you will
almost always end up with writing a ChannelPipelineFactory, which
yields much more flexibility to the pipeline configuration."

And I thought "more flexible but basically the same"... of course I've
failed to read the above paragraphs:

"It might look somewhat complicated at the first glance, and it is
true that we don't need to introduce TimeClientPipelineFactory  in
this particular case because TimeClient creates only one connection"

and

"There's another place that needs a fix. Do you remember that we added
a TimeClientHandler instance to the default ChannelPipeline of the
ClientBootstrap? It means one same TimeClientHandler instance is going
to handle multiple Channels and consequently the data will be
corrupted. To create a new TimeClientHandler  instance per Channel, we
have to implement a ChannelPipelineFactory"


So I guess the only problem of the documentation is that it isn't idiot proof.

Regards.

--
Luis Neves



More information about the netty-users mailing list