Since you have activemq, can you try it with the activemq component
rather than the JMS component?


Can you share more of your example, the problem is that it doesn't compile.

I put together a simple example as well that demos this, but doesn't
reproduce your error.  I'm wondering if somehow you're setting up more
processors within your loop.

final String RS_BASIC_ENDPOINT =
"cxfrs://http://0.0.0.0:9581/rest/?resourceClasses=com.mycompany.rest.LoadUpResource";;
final JmsEndpoint endPoint=
ctx.getEndpoint("activemq:topic:topic1",JmsEndpoint.class);
final ProducerTemplate producer = ctx.createProducerTemplate();
from(RS_BASIC_ENDPOINT).process(new Processor(){
@Override
public void process(final Exchange exchange) throws Exception {
for(int i=0;i<10;i++) {
Exchange outExchange = endPoint.createExchange();
outExchange.setPattern(ExchangePattern.InOnly);
outExchange.getIn().setBody(i);
producer.send(endPoint, outExchange);
}
}
});


from("activemq:topic:topic1").process(new Processor(){
@Override
public void process(final Exchange exchange) throws Exception {
logger.info("footopicProcessor "+exchange.getIn().getBody());
}
});

On Tue, Aug 6, 2013 at 9:35 AM, Nhan Nguyen <ntnha...@gmail.com> wrote:
> I'm using Camel 2.11.0:
>
> <dependency>
>             <groupId>org.apache.camel</groupId>
>             <artifactId>camel-core</artifactId>
>                         <version>2.11.0</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.camel</groupId>
>             <artifactId>camel-jms</artifactId>
>                         <version>2.11.0</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.camel</groupId>
>             <artifactId>camel-spring</artifactId>
>                         <version>2.11.0</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.activemq</groupId>
>             <artifactId>activemq-camel</artifactId>
>                         <version>5.7.0</version>
>         </dependency>
>
> Thanks,
> Nhan
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/The-producer-sent-only-one-message-but-the-comsumer-received-multiple-messages-with-same-content-tp5736733p5736850.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to