camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Soto <alex.s...@envieta.com>
Subject Re: Nett shared worker pool
Date Mon, 12 Oct 2015 14:23:45 GMT
Thank you Claus!
I found good example in the unit test of camel-netty4 component.  In case it helps anybody
here is the fragment:


  <!-- use the worker pool builder to create to help create the shared thread pool -->
  <bean id="poolBuilder" class="org.apache.camel.component.netty4.NettyWorkerPoolBuilder">
    <property name="workerCount" value="2"/>
  </bean>

  <!-- the shared worker thread pool -->
  <bean id="sharedPool" class="io.netty.channel.EventLoopGroup"
        factory-bean="poolBuilder" factory-method="build" destroy-method="shutdownGracefully">
  </bean>

  <camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
      <from uri="netty4:tcp://localhost:5021?textline=true&amp;sync=true&amp;workerGroup=#sharedPool&amp;usingExecutorService=false"/>



Best regards,
Alex soto



> On Oct 12, 2015, at 10:15 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> 
> I think they are called EventLoopGroup now
> https://github.com/apache/camel/blob/master/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyServerBootstrapConfiguration.java#L95
> 
> But you can also check the netty 3 -> 4 migration guide, if they have
> any or netty 4 docs whats its called now.
> 
> And you are welcome to help update the docs
> http://camel.apache.org/contributing
> 
> On Mon, Oct 12, 2015 at 4:10 PM, Alex Soto <alex.soto@envieta.com> wrote:
>> I am trying to follow documentation to:
>> Reusing Netty boss and worker thread pools
>> 
>> with Netty4 component,  but if the page is referring to Netty3, how would this work
with Netty-4?  Any pointers?
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>>> On Oct 12, 2015, at 10:03 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>>> 
>>> Its io.netty now. That link is for jetty 3.x
>>> 
>>> On Mon, Oct 12, 2015 at 3:52 PM, Alex Soto <alex.soto@envieta.com> wrote:
>>>> Hello,
>>>> 
>>>> The documentation here http://camel.apache.org/netty4.html# <http://camel.apache.org/netty4.html#>
 refers to class org.jboss.netty.channel.socket.nio.WorkerPool  however I can’t seem to
find this class in anywhere.  I am using Camel version 2.15.1.  Is the class name correct?
>>>> 
>>>> Best regards,
>>>> Alex soto
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Claus Ibsen
>>> -----------------
>>> http://davsclaus.com @davsclaus
>>> Camel in Action 2nd edition:
>>> https://www.manning.com/books/camel-in-action-second-edition
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2nd edition:
> https://www.manning.com/books/camel-in-action-second-edition


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message