Skip to content

Instantly share code, notes, and snippets.

@dannylamb
Created March 24, 2017 19:04
Show Gist options
  • Save dannylamb/a4e47d580eb993a4130023c55a3a94da to your computer and use it in GitHub Desktop.
Save dannylamb/a4e47d580eb993a4130023c55a3a94da to your computer and use it in GitHub Desktop.
from("timer:foo?period=5000")
.setHeader("IslandoraExchangePattern", constant("InOut"))
.setHeader("IslandoraBroadcastRecipients", constant("activemq:queue:testA,activemq:queue:testB"))
.to("{{input.stream}}")
.log(INFO, LOGGER, "RECEIVED FROM B: ${body}");
from("activemq:queue:testA")
.log(INFO, LOGGER, "Waiting 2 seconds in A")
.process((exchange -> Thread.sleep(2000)))
.log(INFO, LOGGER, "Finished waiting in A")
.transform(constant("AAAAAAAA"));
from("activemq:queue:testB")
.log(INFO, LOGGER, "RECEIVED FROM A: ${body}")
.log(INFO, LOGGER, "Waiting 2 seconds in B")
.process((exchange -> Thread.sleep(2000)))
.log(INFO, LOGGER, "Finished waiting in B")
.transform(constant("BBBBBBBB"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment