Skip to content

Instantly share code, notes, and snippets.

@p3t0r
Created February 27, 2009 09:28
Show Gist options
  • Save p3t0r/71375 to your computer and use it in GitHub Desktop.
Save p3t0r/71375 to your computer and use it in GitHub Desktop.
/**
* listen to topic queue
* -- on incoming message
* --- split message into program fragments using xpath
* ---- extract the id from the program
* ---- write a program document to the xml store
*/
from("activemq:topic:incomingVPROGuide")
.splitter(vpro.xpath("//vpro:program"))
.setHeader(FileComponent.HEADER_FILE_NAME, vpro.xpath("//vpro:program/@id", String.class))
.process(sanitize(FileComponent.HEADER_FILE_NAME))
.to("xmldb:/programs");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment