@@ -15,45 +15,45 @@ npm run test-data
15
15
```
16
16
17
17
## 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 `
20
20
2 . 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 } } `
22
22
3 . check the app console to verify message has been properly handled.
23
23
4 . 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 } } `
25
25
5 . check the app console to verify message has been properly handled.
26
26
6 . 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 } } `
28
28
7 . 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 `
31
31
9 . 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 } } `
33
33
10 . check the app console to verify message has been properly handled.
34
34
11 . 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 } } `
36
36
12 . 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 `
39
39
14 . 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 } } `
41
41
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 } } `
43
43
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 } } `
45
45
46
46
15 . check the app console to verify messages has been properly handled.
47
47
16 . Repeat step 14 again.
48
48
17 . 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 `
51
51
19 . 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 } } `
53
53
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 } } `
55
55
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 } } `
57
57
58
58
20 . check the app console to verify messages has been properly handled.
59
59
21 . Repeat step 14 again.
0 commit comments