Hi

Just a quick reply

1)
You can send a dummy NACK response when the client was not supposed to
get a response

2)
Camel 2.0 have better support for InOptionalOut, so if possible try
with 2.0. There is a 2.0m1 in the central maven repo.

3)
Who is overriding the correlation id? Is it the "private broker" or is
it Camel itself?




On Tue, Mar 24, 2009 at 12:45 PM, N.D. <nicolas_dufai...@hotmail.com> wrote:
>
> Hi,
>
> I encoutered some problem deploying a bridge between 2 jms brokers via
> spring:
>
> On one hand i have a public access jms broker (currently activemq 5.2.0)
> accepting connections from many clients, each one working with a "name
> standardized" set of queues.
>
> On the other hand, i have a private jms broker (same activemq for easier
> testing but will change soon) with only a common set of queues listened by
> my asynchronous processor.
>
> I want to use a camel route to concentrate every clients queues to the ones
> of my private jms broker.
> JMS Messages exchange works as follows:
>
> In some cases, input messages doesn't expect reply (no replyTo set -> so
> InOnly camel speaking)
> In other cases, input messages expect a reply (replyTo set) but depending on
> input message content and security configuration on processor, those one
> could never reply to requester (i quess it falls into the InOptionalOut
> scheme)
>
> Here's my initial configuration:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>                xmlns:amq="http://activemq.apache.org/schema/core";
>                xmlns:cml="http://activemq.apache.org/camel/schema/spring";
>                xmlns="http://www.springframework.org/schema/beans";
>                xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
>                                                        
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd
>                                                        
> http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring-1.5.0.xsd";>
>
>        <!-- - - - - - - - - - - - - - - - - - - - -->
>        <!--      PUBLIC BROKER CONFIGURATION      -->
>        <!-- - - - - - - - - - - - - - - - - - - - -->
>
>        <!-- The public broker -->
>        <bean id="public" class="org.apache.camel.component.jms.JmsComponent">
>                <property name="configuration">
>                        <bean 
> class="org.apache.camel.component.jms.JmsConfiguration">
>                                <property name="connectionFactory">
>                                        <amq:connectionFactory 
> brokerURL="failover:tcp://localhost:61616"
>                                                                               
>          userName="public"
>                                                                               
>          password="toto"/>
>                                </property>
>                        </bean>
>                </property>
>        </bean>
>
>        <!-- The private broker -->
>        <bean id="private" class="org.apache.camel.component.jms.JmsComponent">
>                <property name="configuration">
>                        <bean 
> class="org.apache.camel.component.jms.JmsConfiguration">
>                                <property name="connectionFactory">
>                                        <amq:connectionFactory 
> brokerURL="failover:tcp://localhost:61617"
>                                                                               
>          userName="private"
>                                                                               
>          password="titi"/>
>                                </property>
>                        </bean>
>                </property>
>        </bean>
>
>        <!-- My routing configuration -->
>        <cml:camelContext id="router">
>                <cml:route>
>                        <cml:from uri="public:*.queues.in.*"/>
>                        <cml:to uri="private:private-queues.in.0"/>
>                </cml:route>
>        </cml:camelContext>
>
> </beans>
>
> My problem is that when replyTo is set, camel expect a reply on dynamically
> created temp queue which may never came-back or very late (due to
> asynchronous processing), so dead letter and time out often occurs. I tried
> to add exchangePattern=InOptionalOut on queues without success.
>
> So i disable camel replyTo (via the disableReplyTo property) and manually
> handle it. Input message are so considered as InOnly and my processor
> directly reply setting correlationID as input messageid.
>
> However, routing override incomings messageId so i produce replies with
> wrong correlation id as explainded here:
>
> client push message in public broker
>     -> public broker affect ID=1
>          -> camel route it to private broker which override ID to 2
>               -> so my processor listening private broker handle message
> with ID=2 (producing correlation ID=2 against 1 desired)
>
> I tried to set messageIdEnabled to false on private but it does works (i saw
> activemq 5.2.0 uses camel 1.5.0 which had a bug on messageID copy solved in
> later version so i have customized my active mq to use 1.6.0 but wihout
> success)
>
> Can someone help me to solve my problem ?
>
> Thanks,
> Nicolas
>
> --
> View this message in context: 
> http://www.nabble.com/Routing-keeping-originalMessageId-tp22678749p22678749.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

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

Reply via email to