Skip to content

Instantly share code, notes, and snippets.

@tsabat
Last active December 26, 2015 03:49
Show Gist options
  • Save tsabat/7088726 to your computer and use it in GitHub Desktop.
Save tsabat/7088726 to your computer and use it in GitHub Desktop.
integrations routes and queues

##Caveat

I don't remember this stuff super-well, so there will be some vagaries here.

##Terms

  • queues: holding bins for json-formatted integrations
  • routes: processors for queues, explained here

##Topology

warning: this is from memory, but will look like this somewhat

/integration
/integration/salesforce/
/integration/webhook/
/integration/bury/webhook/
/integration/bury/deadLetter
/deadLetter
/deadLetterWithPayload
...others

##Routing Rules

happy path

  1. all integrations start in /integration
  2. a camel route watches /integration and moves integrations into /integration/$name based on the integration type
  3. another camel route watches each /integration/$name and makes https requests back to wufoo.com, passing the integration as json
  4. retry logic attempts 3 times to send an integration. If it fails, it is removed from the queue, put in the integration_errors table (that name may be wrong, been a while) and an email is sent to the user

unhappy path

  1. all integrations start in /integration
  2. a camel route watches /integration and moves them into /integration/$name
  3. something happens in the /integration to /integration/$name routing (like a missing type on the integration json blob) so, the integration ends up in /deadLetter OR an unhandled exception happens when sending the integration out to a specific integration target. If the target (for example: salesforce) throws an unhandled exception during routing, the integration ends up in /integration/bury/$name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment