-
Notifications
You must be signed in to change notification settings - Fork 3.6k
-
why?
my service is localhost;
image
my codes:
use PhpAmqpLib\Message\AMQPMessage;
include_once './vendor/autoload.php';
//创建连接和channel
$connection = new AMQPStreamConnection('127.0.0.1', 5672, 'admin', 'admin','/',false,
'PLAIN','','en_US',3,3,null,true,15,3);
$channel = $connection->channel();
$channel->queue_declare('hello', false, false, false, false);
$msg = new AMQPMessage('Hello World!');
$channel->basic_publish($msg, '', 'hello');
echo " [x] Sent 'Hello World!'\n";
$channel->close();
$connection->close();```
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
RabbitMQ logs all connection lifecycle events as well as various exceptions. Start with inspecting the logs.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment