camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avnish Pundir <>
Subject Re: netty4(-http) producer workerGroup and producerPool
Date Mon, 07 Nov 2016 21:53:06 GMT
Found it from source code, the example for netty4 should be following:

<!-- use the worker pool builder to create to help create the shared 
thread pool -->
<bean id="poolBuilder" 
   <property name="workerCount" value="2"/>

<!-- the shared worker event group -->
<bean id="sharedPool" class=""
       factory-bean="poolBuilder" factory-method="build" 

Then in the Camel routes we can refer to this worker pools by 
configuring the workerGroup option in the URI as shown below:
   <from uri="direct:postData>
   <to uri="log:result"/>

Avnish Pundir

On 07-11-2016 14:44, Avnish Pundir wrote:
> Hi Willem,
> I just tried sharing the workerpool as per docs of netty4
> ( however the class mentioned in
> example ( for sharing of
> worker pools doesn't exist in netty4. I have camel-netty4 as a
> dependency in maven and "netty-all(4.0.34.FINAL)" is present on my
> project classpath as a transitive dependency. The mentioned class exists
> in netty3 as far as I can tell from googling around.
> Looks to me docs for netty4 are still pointing to camel-netty
> documentation for example section at least, as the example mention "boss
> and worker thread pools" whereas the options mention bossGroup and
> workerGroup (not pools). You did mentioned that you have updated wiki
> doc, if it's relevant can you please share updated doc link or point me
> in right direction for sharing workerGroup with netty4?
> Thanks,
> Avnish Pundir
> On 03-11-2016 15:14, Willem Jiang wrote:
>> Hi,
>> I just checked the code of camel-netty4, the workerGroup can be share
>> between the consumers and producers if the option is specified
>> otherwise camel creates a new workerGroup per consumer or producer.
>> The wiki doc is updated, I will commit a quick fix to the camel netty
>> component.
>> --
>> Willem Jiang
>> Blog: (English)
>> (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>> On November 3, 2016 at 12:55:34 PM, Pundir Avnish
>> ( wrote:
>>> Hi Everyone,
>>> I am trying to use netty4-http (in producer mode) to connect to remote
>>> services. Apparently in my use case there are number of different remote
>>> services (more than 30 in total) I have to talk to. To keep the threads
>>> management under direct control, I was hoping to use same thread pool
>>> for all these endpoints. At a glance it looked like sharing workerGroup
>>> will do the trick. However from the documentation it feels like this
>>> option is for consumer (at least from the examples in
>>> whereas for producer we should be
>>> using producerPool* properties. I need guidance on following from the
>>> community experts -
>>> 1. Is the above understanding correct, i.e. workerGroup can be used ONLY
>>> with consumer? If not what impact will it have if used with producer and
>>> more importantly how does it impact/influence producerPool.
>>> 2. Is it possible to use single executor across all my netty4-http
>>> producers? I don't see usual option of setting executorServiceRef option
>>> with either netty4 or nett4-http.
>>> --
>>> Thanks,
>>> *Avnish Pundir*
>>> --

Disclaimer: The information contained in this communication is 
confidential, private, proprietary, or otherwise privileged and is intended 
only for the use of the addressee.Unauthorized use, disclosure, 
distribution or copying is strictly prohibited and may be unlawful. If you 
have received this communication in error, please delete this message and 
notify the sender immediately - Samin TekMindz India Pvt.Ltd. 

View raw message