This file contains hidden or 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 org.apache.camel.component.redis; | |
| import org.apache.camel.impl.JndiRegistry; | |
| import org.junit.Ignore; | |
| import org.junit.Test; | |
| import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; | |
| import org.springframework.data.redis.core.RedisTemplate; | |
| @Ignore | |
| public class RedisProducerIntegrationTest extends RedisTestSupport { |
This file contains hidden or 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 com.ofbizian.swf.demo; | |
| import org.apache.camel.builder.RouteBuilder; | |
| import org.apache.camel.component.aws.swf.SWFConstants; | |
| import org.apache.camel.main.Main; | |
| public class WorkflowConsumer { | |
| public static void main(String[] args) throws Exception { | |
| Main main = new Main(); |
This file contains hidden or 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 com.ofbizian.swf.demo; | |
| import org.apache.camel.builder.RouteBuilder; | |
| import org.apache.camel.main.Main; | |
| public class WorkflowProducer { | |
| public static String COMMON_OPTIONS = | |
| "accessKey=XXX" | |
| + "&secretKey=XXX" |
This file contains hidden or 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 com.ofbizian.swf.demo; | |
| import org.apache.camel.builder.RouteBuilder; | |
| import org.apache.camel.main.Main; | |
| public class ActivityConsumer { | |
| public static void main(String[] args) throws Exception { | |
| Main main = new Main(); | |
| main.enableHangupSupport(); |
This file contains hidden or 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
| from("aws-swf://activity?domainName=demo&activityList=demo-activity&version=1.0&eventName=processActivities") | |
| .log("Received Activity task ${body}") | |
| .setBody(constant("1")); |
This file contains hidden or 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
| from("aws-swf://workflow?domainName=demo&workflowList=demo-flow&version=1.0&eventName=processWorkflows") | |
| .log("Received a workflow task ${body}") | |
| .filter(header(SWFConstants.ACTION).isEqualTo(SWFConstants.EXECUTE_ACTION)) | |
| .to("aws-swf://activity?domainName=demo&activityList=demo-activity&version=1.0&eventName=processActivities"); |
This file contains hidden or 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
| from("direct:start") | |
| .setHeader(SWFConstants.OPERATION, constant("START")) | |
| .log("Starting a workflow task ${body}") | |
| .to("aws-swf://workflow?domainName=demo&workflowList=demo-flow&version=1.0&eventName=processWorkflows"); |
This file contains hidden or 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
| <camel:route> | |
| <camel:from uri="aws-sqs://{{aws.queue}}?amazonSQSClient=#amazonSQSClient"/> | |
| <convertBodyTo type="java.lang.Integer"/> | |
| <camel:to uri="log:com.ofbizian.before?level=INFO"/> | |
| <camel:resequence> | |
| <!--<camel:batch-config batchSize="100" batchTimeout="1000" />--> | |
| <stream-config capacity="100" timeout="1000"/> | |
| <camel:simple>body</camel:simple> | |
| <camel:to uri="log:com.ofbizian.before?level=INFO"/> |
This file contains hidden or 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
| <camel:route> | |
| <camel:from uri="aws-sqs://{{aws.queue}}?amazonSQSClient=#amazonSQSClient"/> | |
| <convertBodyTo type="java.lang.Integer"/> | |
| <camel:to uri="log:com.ofbizian.before?level=INFO"/> | |
| <camel:to uri="mock:result"/> | |
| </camel:route> |
This file contains hidden or 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
| <route> | |
| <camel:from uri="timer://publish?repeatCount=100&period=1&fixedRate=true"/> | |
| <setBody> | |
| <property>Exchange.TIMER_COUNTER</property> | |
| </setBody> | |
| <camel:to uri="aws-sqs://{{aws.queue}}?amazonSQSClient=#amazonSQSClient"/> | |
| </route> |