[rabbitmq-discuss] Persistant/Semaphore
Larry Lewis
larry.gooroo at gmail.com
Mon Jun 9 07:41:06 BST 2014
I am trying to use the examples to build the stuff.... but with the lvm
plugin I know have (consumer)
<?php
>
> require_once __DIR__ . '/vendor/autoload.php';
> use PhpAmqpLib\Connection\AMQPConnection;
>
> $connection = new AMQPConnection('api.dev.com', 5672, 'larry', '....');
> $channel = $connection->channel();
> $exchange = 'SiteOffline';
> $channel->exchange_declare( $exchange, 'x-lvc', false, true, false);
> list($queue_name, ,) = $channel->queue_declare( "", false, false, true,
> false );
> echo " [*] Waiting for messages on queue '{$queue_name}'. To exit press
> CTRL+C", "\n";
> $channel->queue_bind( $queue_name, $exchange );
> $callback = function($msg)
> {
> echo " [x] Received ", $msg->body, "\n";
> };
>
> $channel->basic_consume( $queue_name, '', false, true, false, false,
> $callback);
> while(count($channel->callbacks))
> {
> $channel->wait();
> }
> $channel->close();
> $connection->close();
>
>
>
It fails on "$channel->queue_bind( $queue_name, $exchange );" with a
'INTERNAL_ERROR' the log says.....
=WARNING REPORT==== 9-Jun-2014::16:32:39 ===
> Non-AMQP exit reason '{undef,
> [{rabbit_basic,delivery,
> [false,
> {basic_message,
> {resource,<<"/">>,exchange,<<"SiteOffline">>},
> [<<>>],
> {content,60,
> {'P_basic',undefined,undefined,undefined,
> undefined,undefined,undefined,undefined,
> undefined,undefined,undefined,undefined,
> undefined,undefined,undefined},
> none,none,
> [<<"On">>]},
>
> <<61,89,209,245,71,119,135,115,235,39,104,132,185,
> 144,44,94>>,
> false},
> undefined],
> []},
> {rabbit_exchange_type_lvc,add_binding,3,[]},
> {rabbit_binding,x_callback,4,
> [{file,"src/rabbit_binding.erl"},{line,544}]},
> {rabbit_binding,'-add/3-fun-0-',3,
> [{file,"src/rabbit_binding.erl"},{line,191}]},
> {rabbit_channel,binding_action,9,
> [{file,"src/rabbit_channel.erl"},{line,1303}]},
> {rabbit_channel,handle_cast,2,
> [{file,"src/rabbit_channel.erl"},{line,275}]},
> {gen_server2,handle_msg,2,
> [{file,"src/gen_server2.erl"},{line,1022}]},
> {proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,239}]}]}'
>
exit reason undef I am assuming that lvm requires something different,
hence my initial request for a php consumer example.
Larry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140608/2965f6f5/attachment.html>
More information about the rabbitmq-discuss
mailing list