action-queue v0.0.1
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
From postman modify the
product_id
in the request body ofSendUpdate-ProductUpdate
request in the postman collectionV1-Action-Queue
.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:
- Connect to test environment redis and get the data JSON for the product the you want to test the update.
- Modify some value in the product data JSON like a price or name and update redis with the new JSON.
- Now from postman modify the
product_id
in the request body ofSendUpdate-ProductUpdate
request in the postman collectionV1-Action-Queue
. - Now wait for the subscriber to process the message(watch the subscriber logs).
- 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:
- Connect to the
relaydb-test
mysql and run a update queue on the product related table for a notedproductId
. - 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:
- Connect to the
relaydb-test
mysql and run a update queue on the product related table for a notedproductId
. - 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.
5 years ago