0.0.1 • Published 5 years ago

action-queue v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Tech Design

Link to the Action Queue - Tech Design

Architecture diagram: https://www.lucidchart.com/invitations/accept/340fbe57-8658-49ad-925b-71d19f10dc8e

Testing

The postman collection(V1-Action-Queue) with the REST calls to simulate the events are in the https://www.getpostman.com/collections/93f70fb47e1b382b9601

Backbone

To test the backbone we will have to verify that messages receieved by backbone are getting received in the SQS queues of the subscribers

  1. From postman modify the product_id in the request body of SendUpdate-ProductUpdate request in the postman collection V1-Action-Queue.

  2. Now connect to the queue specified for the message in the config(src/backbone/config/test.json) and check if the message got delivered.

Subscriber

To test updates to a product:

  1. Connect to test environment redis and get the data JSON for the product the you want to test the update.
  2. Modify some value in the product data JSON like a price or name and update redis with the new JSON.
  3. Now from postman modify the product_id in the request body of SendUpdate-ProductUpdate request in the postman collection V1-Action-Queue.
  4. Now wait for the subscriber to process the message(watch the subscriber logs).
  5. Once the message is processed, get the JSON data for the product id from redis and make sure the value is in sync with the Joybird-MySQL.

MySQL Sync Client

To test updates to MySQL Sync client:

  1. Connect to the relaydb-test mysql and run a update queue on the product related table for a noted productId.
  2. Now, connect to the queue(like in the Subscriber section) and verify that the message recieved in the queue has the modified productId.

End to End Testing

To test the system end to end:

  1. Connect to the relaydb-test mysql and run a update queue on the product related table for a noted productId.
  2. Once the message is processed, get the JSON data for the product id from redis and make sure the value is in sync with the last change.