Last active
March 19, 2016 14:58
-
-
Save monodot/6d353aed98d3e7965a4c to your computer and use it in GitHub Desktop.
Example Camel-annotated RoutingSlip bean for use in Talend ESB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package beans; | |
import java.util.ArrayList; | |
import org.apache.camel.RoutingSlip; | |
public class CustomRoutingSlipBean { | |
@RoutingSlip | |
public ArrayList<String> slip(String body) { | |
ArrayList<String> recipients = new ArrayList<String>(); | |
if (body.startsWith("premium")) { | |
recipients.add("cJMSConnectionFactory1:queue:queue.premium"); | |
} else { | |
recipients.add("cJMSConnectionFactory1:queue:queue.standard"); | |
} | |
return recipients; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment