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/php at master · rohochan/rabbitmq-tutorials

Expand file tree

/

php

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

php

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.gitignore
.gitignore
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
emit_log.php
emit_log.php
 
 
emit_log_direct.php
emit_log_direct.php
 
 
emit_log_topic.php
emit_log_topic.php
 
 
new_task.php
new_task.php
 
 
receive.php
receive.php
 
 
receive_logs.php
receive_logs.php
 
 
receive_logs_direct.php
receive_logs_direct.php
 
 
receive_logs_topic.php
receive_logs_topic.php
 
 
rpc_client.php
rpc_client.php
 
 
rpc_server.php
rpc_server.php
 
 
send.php
send.php
 
 
worker.php
worker.php
 
 

README.md

Outline

PHP code for RabbitMQ tutorials

Here you can find PHP code examples from RabbitMQ tutorials.

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

Requirements

Additionally you need PHP 5.3 and php-amqplib. To get these dependencies on Ubuntu type:

sudo apt-get install git-core php5-cli

Then you can install php-amqplib using Composer.

To do that install Composer and add it to your path, then run the following command inside this project folder:

composer.phar install

Code

Tutorial one: "Hello World!":

php send.php
php receive.php

Tutorial two: Work Queues:

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

Tutorial three: Publish/Subscribe

php receive_logs.php
php emit_log.php "info: This is the log message"

Tutorial four: Routing:

php receive_logs_direct.php info
php emit_log_direct.php info "The message"

Tutorial five: Topics:

php receive_logs_topic.php "*.rabbit"
php emit_log_topic.php red.rabbit Hello

Tutorial six: RPC:

php rpc_server.php
php rpc_client.php
You are visitor 01402792 — 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.