3

So I'm developing this small engine that does a remote integration between two systems in order to sync data, both systems have webhooks for create & update events, and both have APIs (one is REST one is XML), so it is an event-based integration rather than a typical batch one.

My problem is that if System A creates an entry and fires a webhook that the engine catches, if the engine doesn't find it, then it creates a comparable entry in System B which triggers a create webhook, which then the engine catches as a new request... and you see my problem.

Same scenario could happen for an update webhook (actually this one is more likely to happen).

I'm guessing I'm not the first person on the earth to encounter this problem, so I'm wondering what would be an elegant way of handling this given that I cannot modify the APIs, nor inject custom metadata in the messages that could help me catch the loop.

FYI, the integration is between two issue tracking systems.

asked Dec 2, 2013 at 6:24
1
  • I understand that you are describing an infinite loop, but I don't exactly understand how you can get into this situation. Is it possible to add a TTL so that the loop will die after N iterations? Please explain more Commented Dec 3, 2013 at 0:54

1 Answer 1

3

Add a globally unique identifier (GUID) to every issue. Make sure both systems track these IDs. When a system receives a "New issue added" event it will first look up the GUID - if it exists in its own database then it can ignore the event.

answered Dec 10, 2013 at 8:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.