an ID • the payload that came in (extract fields to search on) • a status field (new/processed/failed) A cron job to work through what needs doing and update the status field. @lornajane
have clients polling your API a lot • it's common for another system to react to changes in your system • you want to offer notifications for specific events • any of the above apply either internally or externally @lornajane
guestbooks on our websites. • Allow user to leave their name and a comment • Show the comments left so far • Include webhook management for notifications of new comments @lornajane
to for testing purposes: http://requestb.in/ • Queue is RabbitMQ (https://www.rabbitmq.com/) • RabbitMQ's management plugin has a web interface: http://192.168.121.8:15672 • (comments also go into the database that powers the site) • Worker scripts to send any/all webhooks @lornajane
conn.createChannel(function(err, ch) { var q = 'comments'; ch.assertQueue(q, {durable: true}); ch.consume(q, function(msg) { // make the POST request for each webhook }); }); }); @lornajane