camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel-Mina Request/Response correlation
Date Wed, 11 Mar 2009 07:16:45 GMT
Hi

Feel free to create a ticket if you would like such a feature in Camel
with the mina being able to correlate. Maybe there is something we can
do.
But yet again JMS is much better for reliable messaging, but sometimes
low level TCP could be feasible instead if bringing in a JMS broker in
the server farm.

You can also try other remoting protocols such as RMI, file based :),
XMPP, HTTP, REST, SOAP etc.

On Tue, Mar 10, 2009 at 3:30 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> On Tue, Mar 10, 2009 at 3:08 PM, mam1 <dbrandt@novator.com> wrote:
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> On Mon, Mar 9, 2009 at 6:21 PM, mam1 <dbrandt@novator.com> wrote:
>>>>
>>>> Hi.
>>>>
>>>> I have a multithreaded environment using Camel's Mina component with
>>>> Spring
>>>> Remoting as following:
>>>>
>>>> <camel:camelContext>
>>>>        <camel:proxy id="test_client"
>>>>                     serviceInterface="a.b.c.TestService"
>>>>                     serviceUrl="direct:test_service"/>
>>>>
>>>>        <camel:route id="test_service_mina_route">
>>>>            <camel:from uri="direct:test_service"/>
>>>>            <camel:to
>>>> uri="mina:tcp://localhost:8000?textline=false&amp;minaLogger=true&amp;timeout=100000&amp;lazySessionCreation=true&amp;sync=true&amp;exchangePattern=InOut&amp;transferExchange=true"/>
>>>>        </camel:route>
>>>>    </camel:camelContext>
>>>>
>>>>
>>>> I am getting unexpected results. One calling thread consumes a result
>>>> intended for different calling thread, etc. It looks like there is no
>>>> correlation between request and response. I am using camel 1.6.0.
>>> For reliable request/reply with correlation I would advice to use JMS.
>>>
>>> I assume you use Camel on both the client and server side since you
>>> have option: transferExchange=true that will send Camel API objects to
>>> the server.
>>>
>>> Can you show the server side as well? eg the server that listen on port
>>> 8000.
>>>
>>>
>>>
>>>
>>>>
>>>> Did anybody encounter similar problem? What am i missing and what is a
>>>> solution for this issue?
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Camel-Mina-Request-Response-correlation-tp22413710p22413710.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>>
>>>
>>
>>
>> Thank you for reply.
>>
>> Camel is used on both sides as you correctly assumed. Server side
>> configuration looks like following:
>>
>>    <beans:bean id="test_service" class="a.b.c.TestServiceImpl"/>
>>
>>    <camel:camelContext >
>>        <camel:export id="service_proxy"
>>                      serviceRef="test_service"
>>                      serviceInterface="a.b.c.TestService"
>>
>> uri="mina:tcp://localhost:8000?textline=false&amp;minaLogger=true&amp;timeout=100000&amp;lazySessionCreation=true&amp;sync=true&amp;exchangePattern=InOut&amp;transferExchange=true"/>
>>    </camel:camelContext>
>>
>> Is correlation already implemented for JMS (camel 1.6) component or there is
>> an additional work that has to be done to enable correlation? Can we expect
>> reliable communication using Mina component?
> Yes its a core piece in JMS to be able to correlate JMS messages.
> There is a JMSCorrelationID header for that.
>
> There is a getter on the JMSMessage object for it:
> message.getJMSCorrelationID();
>
> As its a key piece in JMS its implemented by the JMS Broker. Messaging
> using JMS should be considered for reliable messaging.
> And you get all the features from the JMS brokers, such as persistent
> queues, failover, recovery, redelivery and much much more.
>
> Check out ActiveMQ
> http://activemq.apache.org/
>
>
> MINA is used for low level socket communication such as UDP and TCP.
> It shouldn't really be used for a poor mans substitute for JMS.
>
>
>
>> Thansks.
>> --
>> View this message in context: http://www.nabble.com/Camel-Mina-Request-Response-correlation-tp22413710p22434965.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Mime
View raw message