Yes, this is what I ended up doing.  I followed the example of Camel’s Pool 
Builders NettyWorkerPoolBuilder and NettyServerBossPoolBuilder.  
NettyWorkerPoolBuilder has a destroy method, although it does not actually wait 
for completion, and NettyServerBossPoolBuilder does not even have a destroy 
method.  As they are, these classes seem to be of very little use, if at all.

Best regards,
Alex soto



> On Aug 24, 2016, at 11:43 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> 
> You can maybe build your own pojo that shutdown the pool and has a
> void method so you can use destroy-method in the blueprint xml file.
> 
> On Wed, Aug 24, 2016 at 4:25 PM, Alex Soto <alex.s...@envieta.com> wrote:
>> Hello,
>> 
>> Is there a way to destroy the Netty (Boss or Worker) thread pools when using 
>> BluePrint xml?
>> I am trying this:
>> 
>> <bean id="nettySharedWorkerPool"
>>        class="io.netty.channel.EventLoopGroup"
>>        factory-ref="nettyWorkerPoolBuilder"
>>        factory-method="build"
>>        destroy-method="shutdownGracefully">
>> </bean>
>> 
>> But Blueprint does not like the shutdownGracefully method because it is not 
>> a void method (it returns Future<?>).
>> What are other people doing in this case?
>> 
>> (I am using Camel 2.17.0)
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to