Challenge Overview
In this challenge we are aiming to update the Online Review code to allow events to be posted to Topcoder's Kafka server.
Everytime a new review submission is made to the Online Review site we should trigger a new event to the topcoder kafka server.
This should be done using the EventBus end point defined here - https://api.topcoder-dev.com/v5/bus/events.
See the image below for further details.
Online review should post to event bus every time a member creates one of the following review submission:
When copilot/manager makes an update to one of the review submission above, an event with the new data should also be posted to the event bus.
The online review post to event bus must follow V5 standards and kafka-message structure. See below:
The payload when a review submission is created (POST) will be:
The payload when a review submission is updated by manager/copilot (PUT/PATCH) will be:
Everytime a new review submission is made to the Online Review site we should trigger a new event to the topcoder kafka server.
This should be done using the EventBus end point defined here - https://api.topcoder-dev.com/v5/bus/events.
See the image below for further details.
Online review should post to event bus every time a member creates one of the following review submission:
- screening
- checkpoint review
- review
- appeals response
- iterative review
When copilot/manager makes an update to one of the review submission above, an event with the new data should also be posted to the event bus.
The online review post to event bus must follow V5 standards and kafka-message structure. See below:
{ "topic": "notifications.or.submissions.events", "originator": "tc-online-review", "timestamp": "ISO 8601 timestamp", "mime-type": "application/json", "payload": object - see below for examples }
The payload when a review submission is created (POST) will be:
{ "score":98.6, "reviewTypeId":001, "reviewerId":1212, "scorecardId":0045, "eventType": "CREATE" }
The payload when a review submission is updated by manager/copilot (PUT/PATCH) will be:
{ "reviewId":5678, "score":95.0, "reviewTypeId":005, "reviewerId":1012, "userId":001, "scorecardId":0099, "eventType": "UPDATE" }
For checking that the event was sent to the Kafka bus, please use the following site https://lauscher-dev.herokuapp.com/
Autopilot is out of scope of this challenge, since it's already making post to the event bus. But it can be used as reference for this challenge.
Local Setup
Please follow https://github.com/appirio-tech/tc-common-tutorials/tree/master/docker/online_review to build and run the online review locally.
Final Submission Guidelines
- Patch to the Online Review dev branch. Please make sure to point the commit hash used for your submission.
- Verification Guide