Hi, You might want to look at the Mina component source code for gathering details on how to write a mina like component yourself. But I suspect you have done this already ;)
Cheers, Ashwin... anandsk wrote: > > since there is a bug with async route with Mina in camel 2.2.0, > I am thinking of writing a custom component to achieve following as per > huntc suggestion. I am assuming that I can use load balancer component in > case of connection failure to rotate IP addresses in combination with > custom component.I will deploy this as a war app and I am using spring. > I have to use single TCP connection and need to send and receive messages > asynchronously. can someone help me with high level steps to achieve > this?. I am assuming I don't need to worry about thread synchronization > and thread safety as I have to use single connection object. > > I am thinking all I need to do is > 1. extend defaultcomponent and override createendpoint method to return > the same object everytime(declare a singleton spring minaconnector bean > and use annotation to inject into this component). > > 2. extend defaultproducer and override process method to send message on > using singleton spring object. > > 3. extend defaultconsumer and override dostart(establishconnection and > register IOhandler for message receive events) and dostop(disconnect) > > 4. implement messagereceived of IOhandleradapter > I am not sure what goes in here, how to pass the message to next > processor/endpoint for futher processing?. > > 5. extend defaultendpoint and > override createproducer and return number 2 class above. > overrise createconsumer and return number 3 class above. > > 6. ofcourse I need to define this component in spring, so that it is > visible to camel. > > can someone validate above items and let me know, if I need to do anything > else. > > I am thing my sample route would like this. > > from("file:///test/test/response") > .convertBodyTo(String.class) > .to("mycomponent://localhost:6202"); > > from("mycomponent://localhost:6202") > .to("log:+++ reply++++"); > > > > > > > > > > > > ----- --- Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence Progress Software Corporation 14 Oak Park Drive Bedford, MA 01730 --- +1-972-304-9084 (Office) +1-972-971-1700 (Mobile) ---- Blog: http://opensourceknowledge.blogspot.com/ -- View this message in context: http://old.nabble.com/custom-component-using-Mina-tp27879624p27902524.html Sent from the Camel - Users mailing list archive at Nabble.com.