Skip to content

Commit 64d538e

Browse files
committed
fix(typescript/amazon-mq-rabbitmq-lambda): Add missing lambda folder with code
1 parent 0436027 commit 64d538e

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

typescript/amazon-mq-rabbitmq-lambda/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*.d.ts
44
node_modules
55

6+
!lambda/consumer.js
7+
68
# CDK asset staging directory
79
.cdk.staging
810
cdk.out
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
exports.handler = async function(event) {
3+
console.log('Received event:', JSON.stringify(event, undefined, 2));
4+
};
5+
6+
/*
7+
8+
You will see the following output in CloudWatch Log Group after running producer.py
9+
{
10+
"eventSourceArn": "arn:aws:mq:us-west-2:<account-id>:broker:<broker-name>:<broker-id>",
11+
"rmqMessagesByQueue": {
12+
"testQueue::/": [
13+
{
14+
"basicProperties": {
15+
"contentType": null,
16+
"contentEncoding": null,
17+
"headers": null,
18+
"deliveryMode": 2,
19+
"priority": null,
20+
"correlationId": null,
21+
"replyTo": null,
22+
"expiration": null,
23+
"messageId": null,
24+
"timestamp": null,
25+
"type": null,
26+
"userId": null,
27+
"appId": null,
28+
"clusterId": null,
29+
"bodySize": 13
30+
},
31+
"redelivered": true,
32+
"data": "SGVsbG8gV29ybGQgMQ==" <-- Base64 Encoding of "Hello World 1"
33+
},
34+
{
35+
"basicProperties": {
36+
"contentType": null,
37+
"contentEncoding": null,
38+
"headers": null,
39+
"deliveryMode": 2,
40+
"priority": null,
41+
"correlationId": null,
42+
"replyTo": null,
43+
"expiration": null,
44+
"messageId": null,
45+
"timestamp": null,
46+
"type": null,
47+
"userId": null,
48+
"appId": null,
49+
"clusterId": null,
50+
"bodySize": 13
51+
},
52+
"redelivered": true,
53+
"data": "SGVsbG8gV29ybGQgMg==" <-- Base64 Encoding of "Hello World 2"
54+
},
55+
{
56+
"basicProperties": {
57+
"contentType": null,
58+
"contentEncoding": null,
59+
"headers": null,
60+
"deliveryMode": 2,
61+
"priority": null,
62+
"correlationId": null,
63+
"replyTo": null,
64+
"expiration": null,
65+
"messageId": null,
66+
"timestamp": null,
67+
"type": null,
68+
"userId": null,
69+
"appId": null,
70+
"clusterId": null,
71+
"bodySize": 13
72+
},
73+
"redelivered": true,
74+
"data": "SGVsbG8gV29ybGQgMw==" <-- Base64 Encoding of "Hello World 3"
75+
}
76+
]
77+
},
78+
"eventSource": "aws:rmq"
79+
}
80+
81+
*/

0 commit comments

Comments
 (0)