Skip to content

Commit

Permalink
adds e2e binding example
Browse files Browse the repository at this point in the history
  • Loading branch information
videlalvaro committed Sep 28, 2013
1 parent 4566ea2 commit 91df0b0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions demo/e2e_bindings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

include(__DIR__ . '/config.php');
use PhpAmqpLib\Connection\AMQPConnection;

$source = 'my_source_exchange';
$dest = 'my_dest_exchange';

$conn = new AMQPConnection(HOST, PORT, USER, PASS, VHOST);
$ch = $conn->channel();

$ch->exchange_declare($source, 'topic', false, true, false);

$ch->exchange_declare($dest, 'direct', false, true, false);

$ch->exchange_bind($dest, $source);

$ch->exchange_unbind($source, $dest);

$ch->close();
$conn->close();

0 comments on commit 91df0b0

Please sign in to comment.