File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
99const app = new Reshuffle ( )
@@ -17,7 +17,7 @@ const amqp = new AMQPConnector(app, {
1717} )
1818
1919function messageHandler ( msg ) {
20- console . log ( `==> Message ${ msg . content . toString ( ) } received ` )
20+ console . log ( `==> Message ${ msg . content . toString ( ) } received` )
2121}
2222
2323async function main ( ) {
Original file line number Diff line number Diff 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
99const app = new Reshuffle ( )
@@ -19,13 +19,13 @@ const amqp = new AMQPConnector(app, {
1919amqp . on ( { noAck : false } , messageHandler )
2020
2121function messageHandler ( msg ) {
22- console . log ( `==> Message ${ msg . content . toString ( ) } received ` )
22+ console . log ( `==> Message ${ msg . content . toString ( ) } received` )
2323}
2424
2525async 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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments