Andrew Lawrenson created CAMEL-5537:
---------------------------------------

             Summary: Mina2 Consumer doesn't reliably work with SSL
                 Key: CAMEL-5537
                 URL: https://issues.apache.org/jira/browse/CAMEL-5537
             Project: Camel
          Issue Type: Bug
          Components: camel-mina2
    Affects Versions: 2.10.0
            Reporter: Andrew Lawrenson


I've been trying to write a service using Camel 2.10.0 which uses the mina2 
component to expose a service, and which uses SSL, using an endpoint of:

mina2:tcp://localhost:6500?sync=true&filters=#hl7SslFilterFactory,#hl7CodecFilter&allowDefaultCodec=false

however, what I found was that the SSL handshake was failing quite often for no 
apparent reason.  Investigating further, it appeared that messages sent during 
the handshake were being processed out of order - specifically, when the client 
(which uses a standard java SSLSocket) sent a "TLSv1 Change Cipher Spec" 
followed by a "TLSv1 Handshake", the "TLSv1 Handshake" was being processed 
before the "TLSv1 Change Cipher Spec", breaking the process.

This appears to have been caused because when the the Mina2Consumer configures 
MINA for tcp (in Mina2Consumer.setupSocketProtocol), it is using a 
UnorderedThreadPoolExecutor - which allows messages to be processed in any 
order.  Switching this to use a OrderedThreadPoolExecutor instead has fixed the 
issue.

May I request that the use of UnorderedThreadPoolExecutor vs 
OrderedThreadPoolExecutor be configurable via endpoint parameters? (or 
OrderedThreadPoolExecutor is used when SSL if configured).  I'm assuming the 
reason for the use of UnorderedThreadPoolExecutor is simply for performance. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to