MisterYuck
----------

Simple poison message handling for AMPS.

This directory contains the MisterYuck sample. MisterYuck is a message handler
wrapper that uses an AMPS SOW topic to persist information about messages
that can't be successfully processed.

The sample is a companion to the the blog post on poison messaging:
http://www.crankuptheamps.com/blog/posts/2015/01/30/yuck-stateless-poison-message-handling/


Using the Sample
----------------

To see the wrapper in action:

* Start AMPS with the pmh.xml config file. This config file declares the SOW
  topic that MisterYuck uses to store poison message information, and also
  creates a transaction log for message replay.

* Run the publish_data.py script once. This publishes messages into the
  transaction log.

* Run the superstitious_processor.py script. The processor throws an
  exception on any message where the 'id' field is evenly divisible by
  13. For any message where an exception is thrown, MisterYuck logs the
  bookmark for the message to the topic that stores poison message information.

* Run the superstitious_processor.py script again. This time, MisterYuck
  skips the messages that can't be processed.


