@@ -15,45 +15,45 @@ npm run test-data
1515```
1616
1717## Verification
18- 1 . start kafka-console-producer to write messages to ` project.notification .create ` topic:
19- ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.notification .create `
18+ 1 . start kafka-console-producer to write messages to ` project.action .create ` topic:
19+ ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.action .create `
20202 . write message:
21- ` { "topic": "project.notification .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1000, "name": "Develop website", "description": "<h>Test</h><p>This is description</p>", "directProjectId": null, "billingAccountId": 70015983, "type": "Web Application", "createdBy": 132458 } } `
21+ ` { "topic": "project.action .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1000, "name": "Develop website", "description": "<h>Test</h><p>This is description</p>", "directProjectId": null, "billingAccountId": 70015983, "type": "Web Application", "createdBy": 132458 } } `
22223 . check the app console to verify message has been properly handled.
23234 . Again, write another message(directProjectId is provided at this time):
24- ` { "topic": "project.notification .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "name": "<h1>Test Project</h1>", "description": "<h>Test</h><p>This is description</p>", "directProjectId": 500, "billingAccountId": null, "type": "Web", "createdBy": 132458 } } `
24+ ` { "topic": "project.action .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "name": "<h1>Test Project</h1>", "description": "<h>Test</h><p>This is description</p>", "directProjectId": 500, "billingAccountId": null, "type": "Web", "createdBy": 132458 } } `
25255 . check the app console to verify message has been properly handled.
26266 . Try to write an invalid message:
27- ` { "topic": "project.notification .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "name": "<h1>Test Project</h1>", "description": "<h>Test</h><p>This is description</p>", "directProjectId": 500, "billingAccountId": 100, "type": "Web", "createdBy": 132458 } } `
27+ ` { "topic": "project.action .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "name": "<h1>Test Project</h1>", "description": "<h>Test</h><p>This is description</p>", "directProjectId": 500, "billingAccountId": 100, "type": "Web", "createdBy": 132458 } } `
28287 . You will see error message in the app console.
29- 8 . start kafka-console-producer to write messages to ` project.notification .update ` topic:
30- ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.notification .update `
29+ 8 . start kafka-console-producer to write messages to ` project.action .update ` topic:
30+ ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.action .update `
31319 . write message:
32- ` { "topic": "project.notification .update", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "directProjectId": 500, "billingAccountId": 70015984, "updatedBy": 132458 } } `
32+ ` { "topic": "project.action .update", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "directProjectId": 500, "billingAccountId": 70015984, "updatedBy": 132458 } } `
333310 . check the app console to verify message has been properly handled.
343411 . Try to write an invalid message:
35- ` { "topic": "project.notification .update", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "directProjectId": 500, "billingAccountId": 1, "updatedBy": 132458 } } `
35+ ` { "topic": "project.action .update", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project", "id": 1001, "directProjectId": 500, "billingAccountId": 1, "updatedBy": 132458 } } `
363612 . You will see error message in the app console.
37- 13 . start kafka-console-producer to write messages to ` project.notification .update ` topic:
38- ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.notification .create `
37+ 13 . start kafka-console-producer to write messages to ` project.action .update ` topic:
38+ ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.action .create `
393914 . write messages:
40- ` { "topic": "project.notification .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 132457, "role": "copilot", "createdBy": 132458 } } `
40+ ` { "topic": "project.action .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 132457, "role": "copilot", "createdBy": 132458 } } `
4141
42- ` { "topic": "project.notification .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124835, "role": "manager", "createdBy": 132458 } } `
42+ ` { "topic": "project.action .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124835, "role": "manager", "createdBy": 132458 } } `
4343
44- ` { "topic": "project.notification .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124836, "role": "account_manager", "createdBy": 132458 } } `
44+ ` { "topic": "project.action .create", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124836, "role": "account_manager", "createdBy": 132458 } } `
4545
464615 . check the app console to verify messages has been properly handled.
474716 . Repeat step 14 again.
484817 . You will see error messages in the app console.
49- 18 . start kafka-console-producer to write messages to ` project.notification .update ` topic:
50- ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.notification .delete `
49+ 18 . start kafka-console-producer to write messages to ` project.action .update ` topic:
50+ ` bin/kafka-console-producer.sh --broker-list localhost:9092 --topic project.action .delete `
515119 . write messages:
52- ` { "topic": "project.notification .delete", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 132457, "role": "copilot", "deletedBy": 132458 } } `
52+ ` { "topic": "project.action .delete", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 132457, "role": "copilot", "deletedBy": 132458 } } `
5353
54- ` { "topic": "project.notification .delete", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124835, "role": "manager", "deletedBy": 132458 } } `
54+ ` { "topic": "project.action .delete", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124835, "role": "manager", "deletedBy": 132458 } } `
5555
56- ` { "topic": "project.notification .delete", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124836, "role": "account_manager", "deletedBy": 132458 } } `
56+ ` { "topic": "project.action .delete", "originator": "project-api", "timestamp": "2018-07-02T00:00:00", "mime-type": "application/json", "payload": { "resource": "project.member", "projectId": 1001, "userId": 124836, "role": "account_manager", "deletedBy": 132458 } } `
5757
585820 . check the app console to verify messages has been properly handled.
595921 . Repeat step 14 again.
0 commit comments