Simple Jira Bot ExampleAvailable as of Camel 2.7 The example is included in the distribution at examples/camel-example-simplejirabot. It contains a README.txt file with details how to use and run it. The routesThis example has 1 route implemented in both the Java and XML DSLs as an example. Both route from a RSS endpoint to an IRC endpoint. Java DSL from("rss:" + rssURL). marshal().rss(). setBody(xpath("/rss/channel/item/title/text()")). transform(body().prepend("Jira: ")). to("log:jirabot?showHeaders=false&showExchangePattern=false&showBodyType=false"). to("irc:JiraBot@irc.freenode.net/#jirabottest"); XML DSL <route> <from uri="rss:https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-rss/temp/SearchRequest.xml?pid=12311211&sorter/field=issuekey&sorter/order=DESC&tempMax=1000&delay=10s"/> <marshal> <rss/> </marshal> <setBody> <xpath>/rss/channel/item/title/text()</xpath> </setBody> <to uri="log:jirabot?showHeaders=false&showExchangePattern=false&showBodyType=false"/> <to uri="irc:JiraBot@irc.freenode.net/#jirabottest"/> </route> Information for configuring each endpoint can be found here: UsageTo run the Java DSL example type cd javadsl mvn camel:run To run the XML Configuration example type cd xmlconf mvn camel:run It takes about 10 second before the bot will join the channel and Camel logs to the screen the first time. The log should be like this
2011-01-03 07:24:43,840 [archRequest.xml] INFO jirabot - Exchange[Body:[CAMEL-2480] Use mock XMPP server for unit tests]
See Also
|