Example of workflow taking external json input into queue

I had a use case where I need to send json records in an array to be created as corteza records.

I was exploring ways to use the corteza queue to return quicker to the client application and then have a second workflow to consume the records placed on the queue.

What is happens here is:

  • Use postman to post to the workflow using escaped json string
  • First workload reads array and writes each element to the queue
  • Consumer workflow reads each element and creates a record

Note that the tricky bit was escaping the JSON should it would be created correctly in the consumer.

2 Likes