You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Alex Soto <al...@envieta.com> on 2016/08/24 14:25:31 UTC
How to destroy Netty Pools in Blueprint
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
Re: How to destroy Netty Pools in Blueprint
Posted by Claus Ibsen <cl...@gmail.com>.
We love contributions
http://camel.apache.org/contributing
On Wed, Aug 24, 2016 at 9:35 PM, Alex Soto <al...@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 <cl...@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 <al...@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
Re: How to destroy Netty Pools in Blueprint
Posted by Alex Soto <al...@envieta.com>.
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 <cl...@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 <al...@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
Re: How to destroy Netty Pools in Blueprint
Posted by Claus Ibsen <cl...@gmail.com>.
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 <al...@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