jberstler commented on issue #271: Handle Action Error
URL: 
https://github.com/apache/incubator-openwhisk-package-kafka/issues/271#issuecomment-398187924
 
 
   @regmebaby Right now, whoever fires the trigger actually gets no feedback at 
all about whether any connected actions even run, let alone if those actions 
succeed. This is as-designed to keep trigger firing as lightweight and quick as 
possible. As such, the kafka/message hub event provider can't automatically 
know that your actions failed and to skip backwards to re-fire triggers for 
those messages.
   
   On top of that, as far as I know, it is currently not possible to pause an 
event provider to stop if from firing triggers. But even if that were possible, 
there is also no way to tell the Kafka/Message Hub trigger to rewind and 
re-fire for a specific message or offset.
   
   So... what to do in this situation? If you need to guarantee that every 
message is processed, I think you will need to handle it in your action.
   
   One way to handle this situation is to persist somewhere (Cloudant? Reddis?) 
information about the messages that failed processing. You could persist either 
the entire message contents or, perhaps, just the topic and offset for the 
message as this is contained in the trigger payload sent to the action handling 
the messages. In either case, you could then have a periodic trigger that fires 
every so often to retry processing on messages that need it. This trigger would 
fire an action that:
   
   1. Examines your persisted store of messages that failed processing
   2. Attempts to process them by invoking the right action(s)
   3. If successful, removes the message from the store (or marks it as being 
successfully processed)
   4. If processing fails, it leaves those messages around for another retry, 
the next time the periodic trigger fires.
   
   > Should all affected messages be sent to a Dead-Letter-Queue/Topic?
   
   I believe this has been discussed at some point, but only for scenarios 
where the trigger fails to fire. There is no way to make the event provider do 
this for you when trigger successfully fires, but the triggered actions fail.
   
   I hope this helps.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to