camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: Camel routes to JMS problem: one simple message sent many times (duplicated)
Date Wed, 28 Jan 2009 17:40:59 GMT
2009/1/28 Matvey <matteo@inbox.ru>:
>
> My confuguration: I want updatesender bean to send one JMS message to Updates
> queue every time the method sendUM() invokes. In a real life it work a bit
> different...

how about something like this...

http://camel.apache.org/pojo-producing.html

public class Foo {
  @EndpointInject(uri="activemq: Updates")
  ProducerTemplate producer;

  public void sendUM() {
      producer.sendBody("<hello>world!</hello>");
  }
}


> <camelContext id="camel"
>                xmlns="http://activemq.apache.org/camel/schema/spring">
>    <package>org.apache.camel.example.spring</package>
>
>    <route>
>      <from uri="bean:updatesender?methodName=sendUM"/>
>      <to uri="activemq:queue:Updates?exchangePattern=InOnly" />
>    </route>

this route will poll your bean; am not sure thats what you want

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Mime
View raw message