diff --git a/builder.php b/builder.php index 9c489c4..ffe3766 100644 --- a/builder.php +++ b/builder.php @@ -81,7 +81,7 @@ function runner($msg) { 'content_type' => 'application/json', 'delivery_mode' => AMQPMessage::DELIVERY_MODE_PERSISTENT, )); - $msg->delivery_info['channel']->basic_publish($message, '', 'build-results'); + $msg->delivery_info['channel']->basic_publish($message, 'build-results'); $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); echo "finished\n"; diff --git a/poster.php b/poster.php index ee9e8b3..1d93ea3 100644 --- a/poster.php +++ b/poster.php @@ -8,8 +8,12 @@ $connection = rabbitmq_conn(); $channel = $connection->channel(); $channel->basic_qos(null, 1, true); + +$channel->exchange_declare('build-jobs', 'fanout', false, true, false); + list($queueName, , ) = $channel->queue_declare('build-results', false, true, false, false); +$channel->queue_bind($queueName, 'build-jobs'); function runner($msg) { $body = json_decode($msg->body);