camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmytro Rud (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAMEL-2049) Improper configuration of MINA connector and acceptor instances; Better producer
Date Sat, 03 Oct 2009 20:14:00 GMT

    [ https://issues.apache.org/activemq/browse/CAMEL-2049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54607#action_54607
] 

Dmytro Rud edited comment on CAMEL-2049 at 10/3/09 1:12 PM:
------------------------------------------------------------

> I am a bit inclined to patch Camel 1.x with your socket producer
> as then we got different solution in 1.x vs. 2.0 (pooled)
> Any thoughts?

If there is no way to make the 1.x producer pooled as well, it would be IMHO better to have
different solutions in 1.x vs. 2.0 than to have an uniform solution which works in 2.0 only...



      was (Author: rnd):
    > I am a bit inclined to patch Camel 1.x with your socket producer
> as then we got different solution in 1.x vs. 2.0 (pooled)
> Any thoughts?

If there is no way to make the 1.x producer pooled as well, it would be IMHO better to have
different solutions in 1.x vs. 2.0 as to have an uniform solution which works in 2.0 only...


  
> Improper configuration of MINA connector and acceptor instances; Better producer
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-2049
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2049
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mina
>    Affects Versions: 1.6.0
>         Environment: Windows XP
>            Reporter: Dmytro Rud
>            Assignee: Claus Ibsen
>             Fix For: 1.6.2, 2.0.0
>
>         Attachments: MinaComponent.patch, MinaSocketProducer.java
>
>
> A sample scenario where both MINA producer(s) and consumer(s) are used in the same route
(e.g. some kind of dispatching or proxying):
> from("mina:tcp://localhost:8888?lazySessionCreation=true&sync=true")
>     .to("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true");
> from("mina:tcp://localhost:7777?lazySessionCreation=true&sync=true")
>     .process(/*prepare answer*/);
> Due to improper configuration of MINA acceptor and connector instances in MinaComponent#createSocketEndpoint(),
no more than 15 incoming threads can be served at port 8888 -- the producer becomes unable
to open an outgoing session.  This is actually an issue of MINA, not of Camel -- a test application
written using "raw" MINA shows the same behaviour.
> A solution is to apply configuration rules described, e.g., at http://mina.apache.org/configuring-thread-model.html,
as done in the attached patch.
> Moreover, the standard Camel-MINA producer is not thread-safe -- actually a well-known
point.  A second attached file contains a thread pool-based reentrant version, which can be
efficiently used for TCP endpoints with both parameters 'lazySessionCreation' and 'sync' set
to true.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message