title: Implementing a request-reply protocol with Apache Camel Mina Component
body: <p>I need to implement a consumer to an XML-RPC based service over TCP. Upon establishing a connection to the server, it requires that</p>
  
  <ol>
  <li>Authentication credentials be sent by the client</li>
  <li>An event subscription request be sent by the client, and finally</li>
  <li>The client is to switch into a "receiving" mode where messages will be sent asynchronously</li>
  <li>When the client is no longer interested in receiving more events, the client ought to "unwind" steps 1-3.</li>
  </ol>
  
  <p>So, I would like to use Apache Camel to implement the client, with an obvious entry endpoint of a Mina Component ("mina:tcp://<em>host</em>:_port_?textline=true&amp;decoderMaxLineLength=10240&amp;sync=true"). My question is, how would I go about implementing steps 1, 2, and 4 above? How would I go about performing those "handshake" steps before the processor in my RouteBuilder gets call? Is this even possible with Camel or will I have to write a straight Mina client to handle this. Are there better options for dealing with this type of integration scenario?</p>
  
  <p>Thank you.</p>
  
  <p>-Santi</p>