Hi Willem,
Thanks for your response. I can check the message body for the two command
headers that just need to be written out but not expect a reply.
I think the underlying implementation for Mina2Producer will block my use
case.
I cannot do sync=false and with sync=true the Mina2Producer implementation
always checks for a response within a specific timeout.

May be need to write my own implementation?  Any ideas of doing this out of
the box ?

Thanks.
On 2 Apr 2015 11:24, "Willem.Jiang [via Camel]" <
[email protected]> wrote:

> Current Camel-Mina2 producer just wait for the response when the endpoint
> sync option is true, it doesn’t support to set the reply mode dynamically.
>
> BTW, can you tell if Message exchange pattern by just looking up the
> message content?
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On April 2, 2015 at 1:03:58 PM, itsavvy.ankur ([hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5765186&i=0>) wrote:
>
> > I am trying to build a prototype using Apache Camel-Mina2 component. We
> have
> > our own protocol implementation on TCP and I need to intercept Client -
> > Server messages using a proxy Component. Existing - TCP Client ----> TCP
> > Server
> >
> > New - TCP Client ----> Proxy Server -----> TCP Server
> >
> > One of the issue in our protocol is that each Request is not guaranteed
> a
> > reply from the server, so some requests will be sent on the channel with
> an
> > optional response. However some requests will also get back a response.
> >
> > Protocol Semantics : Hi ----> <---- Hello How Are You ------> Are You
> okay
> > -----> <-----Yes
> >
> > As you can see messages with ----> are from client to server and <----
> are
> > responses from Server ( on a single stream /line).
> >
> > Now given the above problem, Camel-Mina2 works on a InOut message
> exchange
> > pattern. The ExchangePattern Enumeration also has an InOptionalOut use
> case.
> >
> > Any suggestions how I can configure my endpoints? I would like to know
> if
> > it is possible to make use of an InOptionalOut exchange pattern. So
> > essentially not worry about the response for certain types of messages.
> Can
> > I handle this programmatically - Read the Message Body and decide if a
> > Request needs a Response or just needs to be written out ?
> >
> > Sample implementation is as below:
> >
> > SimpleRegistry reg = new SimpleRegistry();
> > reg.put("ProtocolCodec", new ProtocolCodec());
> > CamelContext context = new DefaultCamelContext(reg);
> >
> > context.addRoutes(new RouteBuilder() {
> >
> > @Override
> > public void configure() throws Exception {
> > // TODO Auto-generated method stub
> >
> >
> from("mina2:tcp://localhost:9888?sync=true&codec=#ProtocolCodec&disconnectOnNoReply=false").
>
> >
> >
> to("mina2:tcp://localhost:9889?sync=true&codec=#ProtocolCodec&disconnectOnNoReply=false&clientMode=true");
>
> >
> > }
> > });
> >
> > context.start();
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184p5765186.html
>  To unsubscribe from Apache Camel-Mina2 ExchangePattern, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5765184&code=aWFtdGhlb25lLmFua3VyQGdtYWlsLmNvbXw1NzY1MTg0fC01MTEzNTA1MDg=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184p5765187.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to