camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to destroy Netty Pools in Blueprint
Date Thu, 25 Aug 2016 05:09:22 GMT
We love contributions
http://camel.apache.org/contributing



On Wed, Aug 24, 2016 at 9:35 PM, Alex Soto <alex.soto@envieta.com> wrote:
> 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.ibsen@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.soto@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
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message