= Feed Action
This feed action is responsible for creating the JMS Feed listener and associating it with a Trigger
[[pre-req]] = Pre-requisite
openwhisk
====== Build and Deploy
[[create-package]] === Create Package
<1> this could be anything, if you change it please update link:./pom.xml[pom.xml] openwhisk.package
property
mvn clean package <1>
<1> if you have https://github.com/apache/incubator-openwhisk-cli[WSK CLI] installed, post package
[[create-trigger]] === Create Trigger
==== Create Trigger, Action and Rule
wsk trigger create camelTrigger
--feed redhatdevelopers/camel-feed
-p mapping '{ date: "header[CamelTimerFiredTime]", counter: "header[CamelTimerCounter]" }'
-p routeUrl 'timer://foo?fixedRate=true&period=10000'
wsk action create camelTriggerAction camel-feed-action/src/handler.js
<1> Create a camel route <4> Create a dummy action just to see what parameters are sent via the event source <5> Associate the Trigger with Action via a rule
wsk -i rule enable cacheEntryRule. As deleting trigger will disable any
active rules associated with it
======= Testing Application
<1> Check if the camelTriggerAction action is triggered as a result of cache entry addition <2> Check what payload the camelTriggerAction has recevied
Content type
Image
Digest
Size
288.9 MB
Last updated
over 8 years ago
docker pull gnodet/openwhisk-camel