Hi

I have committed fixes to camel-netty today.

Can you test it on your system. It should now support re-connection
and proper shutdown and whatnot.

Mind that I have aligned and added the options so it matches the one
we got in camel-mina.
eg sync is now default true etc.

Updated wiki page
https://cwiki.apache.org/confluence/display/CAMEL/Netty


On Thu, May 6, 2010 at 11:19 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
> Hi
>
> I created a couple of tickets to improve/fix camel-netty
> https://issues.apache.org/activemq/browse/CAMEL-2698
> https://issues.apache.org/activemq/browse/CAMEL-2699
>
> I got the first one committed, and will work on the 2nd ticket.
>
>
> On Thu, May 6, 2010 at 6:33 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:
>> Hi
>>
>> Well spotted. Can you create a JIRA ticket ticket for that.
>>
>>
>> On Thu, May 6, 2010 at 6:29 AM, Gareth Collins
>> <gareth_coll...@hotmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I took a look at the Netty Producer code:
>>>
>>>    public void process(Exchange exchange) throws Exception {
>>>        if (configuration.isSync()) {
>>>            countdownLatch = new CountDownLatch(1);
>>>        }
>>>
>>>        Channel channel = channelFuture.getChannel();
>>>        channel.write(exchange.getIn().getBody());
>>>
>>>        if (configuration.isSync()) {
>>>            boolean success =
>>> countdownLatch.await(configuration.getReceiveTimeoutMillis(),
>>> TimeUnit.MILLISECONDS);
>>>            if (!success) {
>>>                throw new ExchangeTimedOutException(exchange,
>>> configuration.getReceiveTimeoutMillis());
>>>            }
>>>            Object response = ((ClientChannelHandler)
>>> clientPipeline.get("handler")).getResponse();
>>>            exchange.getOut().setBody(response);
>>>        }
>>>    }
>>>
>>> After taking a look at the netty documentation, I don't see how this will
>>> detect write failures (as I understand the channel.write() is asynchronous).
>>> Don't we need to wait on the ChannelFuture returned from the
>>> channel.write()? (i.e.
>>>
>>> Channel channel = channelFuture.getChannel();
>>> ChannelFuture channelWriteFuture =
>>> channel.write(exchange.getIn().getBody());
>>> channelWriteFuture.awaitUninterruptibly()
>>> if (channelWriteFuture.isSuccess() == false)
>>> {
>>>    // throw some exception
>>>    // or possibly if connection closed, try to create connection and send
>>> again
>>>    // if fails again throw exception
>>> }
>>>
>>> thanks in advance,
>>> Gareth Collins
>>>
>>>
>>> --
>>> View this message in context: 
>>> http://old.nabble.com/Recovery-From-Netty-Connection-Drop-tp28467631p28469185.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to