Questions tagged [php-amqplib]

This library is a pure PHP implementation of the Advanced Message Queuing Protocol (AMQP)

For more information about this library see the projects github page.

For more information about the Advanced Message Queuing Protocol, see the related wikipedia article or the amqp.org website.

105 questions
21
votes
2 answers

RabbitMQ error timeout

I've set up RabbitMQ in order to parse some 20.000 requests from an external API but it keeps timing out after a few minutes. It does get to correctly parse about 2000 out of the total 20.000 requests. The log file says: =INFO REPORT====…
surfer01
  • 349
  • 1
  • 2
  • 11
11
votes
3 answers

PHP RabbitMQ setTimeout or other option to stop waiting for queue

I'm required to create a simple queue manager to pass a number from a sender to a consumer. Hello World tutorial provided by RabbitMQ covers almost 70% of it. But I need to change the queue to not to forever waiting for incoming messages. Or stop…
jedi
  • 151
  • 1
  • 1
  • 9
8
votes
1 answer

RabbitMq connection reset by peer

I have stainger error with RabbitMQ. I send some information of product threw RabbitMq and Php, but something went wrong. I can send message near one minute after that i had exception "errno=104 Connection reset by peer" . See below: 2016-05-09…
galillei
  • 81
  • 1
  • 1
  • 6
7
votes
1 answer

How can I get single message from rabbitMq queue using PHP?

I need to catch just one actual message from one queue. Rabbit tries to catch all of them. Simplified code below: private function getSingleTask(){ $connection = new AMQPConnection('localhost', 5672, 'guest', 'guest'); $channel =…
Tesmen
  • 559
  • 1
  • 6
  • 21
6
votes
3 answers

How do I use the RabbitMQ delayed message queue from PHP?

I'm trying to use the Delayed Message Queue for RabbitMQ from PHP, but my messages are simply disappearing. I'm declaring the exchange with the following code: $this->channel->exchange_declare( 'delay', 'x-delayed-message', false, /*…
Jesse Weigert
  • 4,714
  • 5
  • 28
  • 37
5
votes
0 answers

PhpAmqpLib Getting 'PRECONDITION_FAILED - consumer ack timed out on channel 1', (0, 0),

After adding 'delivery_mode' => 2 started getting error Unrecoverable error: PreconditionFailed(406, 'PRECONDITION_FAILED - consumer ack timed out on channel 1', (0, 0), '') Timeout value used: 1800000 ms. This timeout value can be configured, see…
pkvd
  • 91
  • 1
  • 9
5
votes
1 answer

What is the meaning of $channel->wait() in RabbitMQ

I am quite new in RabbitMQ. I'm working with php-amqplib library with codeigniter, and still wondering about some knowledge which I am lacking. Why $channel->wait() is used? Why it is always reside inside an endless while loop? How to/Can I bypass…
NeonHead
  • 51
  • 1
  • 5
5
votes
2 answers

AMQP - connection timed out

I receive an error, when trying to receive answer from RabbitMQ. 2015-07-03 09:31:12 [10.1.101.55][-][-][error][PhpAmqpLib\Exception\AMQPTimeoutException] exception 'PhpAmqpLib\Exception\AMQPTimeoutException' with message 'The connection timed out…
user2264941
  • 407
  • 1
  • 8
  • 23
5
votes
1 answer

How to use channel.assertQueue function from amqplib library for node.JS?

I am developing a messaging app using RabbitMQ, and Node.JS. I am using amqplib for this purpose. I am new to Node.JS and finding few difficulties in understanding the syntax of amqplib.. For e.g. there is a function for declaring queue, that…
Pritam
  • 685
  • 1
  • 14
  • 29
5
votes
2 answers

RabbitMQ PHP AMQP Library - Get message headers

I have got a simple queueing system which, obviously, takes messages and publishes them. However, due to a new development in the system, we now need to check for the x-death headers from the exchange, however, I can't seem any documentation on how…
DarkMantis
  • 1,510
  • 5
  • 19
  • 40
4
votes
1 answer

PHP ampq + rabbit MQ -- long running producer: can send messages to queues already declared, but can't declare new queues

I have a "producer" that's supposed to be always running, but it seems that after a day or so, it is still able to send messages to queues it has previously declared, but when trying to declare a new queue, it blows up…
Skeets
  • 4,476
  • 2
  • 41
  • 67
4
votes
1 answer

Get queue size from rabbitmq consumer's callback with PhpAmqpLib

I want to log working status from workers' callbacks and include a number of messages in the queue left. The only solution I found so far is getting the second member of queue_declare result array, but this should be called once per worker launch,…
13DaGGeR
  • 147
  • 1
  • 10
4
votes
1 answer

"PhpAmqpLib\Exception\AMQPRuntimeException: Channel connection is closed" Error with Lumen Queues

I am using vladimir-yuldashev/laravel-queue-rabbitmq library to use RabbitMq queues in Lumen project. The queue functionality is working fine, but I see tons of below errors in my log file. lumen.ERROR: PhpAmqpLib\Exception\AMQPRuntimeException:…
ayip
  • 2,473
  • 1
  • 19
  • 30
4
votes
2 answers

RabbitMQ - How to check if queue is empty?

I have a web service interface that abstracts a RabbitMQ server (don't ask me why, I know it's an unnecessary step, but I have to). That is, I poll messages from the queue through a web service call, not directly over amqp. Consuming via…
Ahmed Khalaf
  • 1,401
  • 2
  • 15
  • 29
4
votes
1 answer

PHP AMQP pass headers in request

I am trying to send a request to AMQP, stuck at how to add header to the request message, the below is the wrapper we are having $message = ‘{"empId": ‘.$empId.', “empName”:”my name"}’; $resData = $rpcClient->call($message, self::EXCHANGE,…
user804401
  • 1,990
  • 9
  • 38
  • 71
1
2 3 4 5 6 7