GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — rabbitmq-tutorials/javascript-nodejs at master · killbugs/rabbitmq-tutorials

Expand file tree

/

javascript-nodejs

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

javascript-nodejs

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
amqp-hacks.js
amqp-hacks.js
 
 
emit_log.js
emit_log.js
 
 
new_task.js
new_task.js
 
 
package.json
package.json
 
 
receive.js
receive.js
 
 
receive_logs.js
receive_logs.js
 
 
send.js
send.js
 
 
worker.js
worker.js
 
 

README.md

Outline

Node.js code for RabbitMQ tutorials

Here you can find Node.js code examples from RabbitMQ tutorials.

To successfully use the examples you will need a running RabbitMQ server.

Requirements

Apart from npm and node, to run this code you need node-amqp version 0.1.X. To pull the dependency from npm run:

npm install amqp

Code

Tutorial one: "Hello World!":

node send.js
node receive.js

Tutorial two: Work Queues:

node new_task.js "A very hard task which takes two seconds.."
node worker.js

Tutorial three: Publish/Subscribe:

node receive_logs.js
node emit_log.js "info: This is the log message"
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.