Skip to content

Commit 2b3fcea

Browse files
Merge pull request #20 from jfromaniello/patch-1
fix issue with variable name in the example
2 parents 0836698 + 100fe0b commit 2b3fcea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ async function init() {
6464
const connection = await amqplib.connect('amqp://localhost');
6565

6666
// initial setup (e.g. should be provided on first launch)
67-
const queueName = 'predefined-queue-name';
67+
const requestsQueue = 'predefined-queue-name';
6868
const channel = await connection.createChannel();
69-
await channel.assertQueue(queueName);
69+
await channel.assertQueue(requestsQueue);
7070

7171
// server start
72-
const server = new AMQPRPCServer(connection, {queueName});
72+
const server = new AMQPRPCServer(connection, { requestsQueue });
7373
server.addCommand('hello', (name) => ({message: `Hello, ${name}!`}));
7474
await server.start();
7575

7676
// client start
77-
const client = new AMQPRPCClient(connection, {requestsQueue:queueName});
77+
const client = new AMQPRPCClient(connection, { requestsQueue });
7878
await client.start();
7979
const response = await client.sendCommand('hello', ['Alisa']);
8080
console.log('Alisa got response:', response);

0 commit comments

Comments
 (0)