Skip to content

Commit 69a7561

Browse files
zacmosfoundingnimo
authored andcommitted
Code review
1 parent 492bc46 commit 69a7561

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

examples/queue/amqp/amqp-sdk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { AMQPConnector } = require('reshuffle-amqp-connector')
33

44
// This example uses reshuffle-amqp-connector
55
// Code and documentation available on Github: https://github.com/reshufflehq/reshuffle-amqp-connector
6-
// Examples can be found in https://www.npmjs.com/package/amqplib
6+
// More information can be found in https://www.npmjs.com/package/amqplib
77
// and in https://www.rabbitmq.com/tutorials/tutorial-two-javascript.html
88

99
const app = new Reshuffle()
@@ -17,7 +17,7 @@ const amqp = new AMQPConnector(app, {
1717
})
1818

1919
function messageHandler(msg) {
20-
console.log(`==> Message ${msg.content.toString()} received `)
20+
console.log(`==> Message ${msg.content.toString()} received`)
2121
}
2222

2323
async function main() {

examples/queue/amqp/amqp.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { AMQPConnector } = require('reshuffle-amqp-connector')
33

44
// This example uses reshuffle-amqp-connector
55
// Code and documentation available on Github: https://github.com/reshufflehq/reshuffle-amqp-connector
6-
// Examples can be found in https://www.npmjs.com/package/amqplib
6+
// More information can be found in https://www.npmjs.com/package/amqplib
77
// and in https://www.rabbitmq.com/tutorials/tutorial-two-javascript.html
88

99
const app = new Reshuffle()
@@ -19,13 +19,13 @@ const amqp = new AMQPConnector(app, {
1919
amqp.on({ noAck: false }, messageHandler)
2020

2121
function messageHandler(msg) {
22-
console.log(`==> Message ${msg.content.toString()} received `)
22+
console.log(`==> Message ${msg.content.toString()} received`)
2323
}
2424

2525
async function main() {
2626
setTimeout(function () {
27-
amqp.sendMessage('MSG-011', { deliveryMode: true })
28-
amqp.sendMessage('MSG-012')
27+
amqp.sendMessage('MSG-001', { deliveryMode: true })
28+
amqp.sendMessage('MSG-002')
2929
}, 2000)
3030
}
3131

examples/queue/amqp/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"name": "amqp-example",
2+
"name": "amqp-examples",
33
"version": "1.0.0",
4-
"description": "Reshuffle AMQP Example",
4+
"description": "Reshuffle AMQP Examples",
55
"main": "amqp.js",
66
"scripts": {
77
"start": "node amqp.js",
8+
"start-sdk": "node amqp-sdk.js",
89
"test": "echo \"Error: no test specified\" && exit 1"
910
},
1011
"license": "ISC",

0 commit comments

Comments
 (0)