Questions tagged [php-amqp]

The PECL package implementing AMQP ("Advanced Message Queue Protocol") as a PHP extension. For the implementation in pure PHP, use [tag:php-amqplib].

Definition

AMQP ("Advanced Message Queue Protocol") is an open standard middleware layer for message routing and queuing. This tag is for the PECL AMQP extension, which implements the protocol as a PHP extension (written in C).

Usage

Questions tagged with should specifically relate to usage of the PECL AMQP extension, whether a development question or a troubleshooting issue. Questions about the php-amqplib library should be tagged instead.

The questions should also be tagged with , as well as any other relevant frameworks used.

31 questions
8
votes
1 answer

How to use php-amqplib rabbitMQ on web browser

I am trying to use php-amqplib for sending and receiving message. It works sending/receiving on terminal. But When go for web browser, unable to receive from queue it continuously waits for message. I used below code for…
Prak
  • 815
  • 7
  • 18
7
votes
2 answers

How to delay? - php-amqplib

I would like to know how to delay with Amqpphplib. I used this great coffee script tutorial : https://github.com/jamescarr/rabbitmq-scheduled-delivery but it doesn't seems to work with PHP-amqplib. The message expires as I want, but it seems that…
LucasC
  • 141
  • 2
  • 7
6
votes
0 answers

RabbitMQ PHP (pecl php-amqp) reading takes more then 1.5 second (during a small benchmark)

We have a test running with RabbitMQ, but somehow hit a "threshold" which makes RabbitMQ slow. What we did, we setup a RabbitMQ server and made a small PHP script that uses pecl-amqp to connect (no pconnect) to the MQ server, sends 1 random message…
Ali Alwash
  • 533
  • 1
  • 6
  • 23
5
votes
1 answer

PECL AMQP vs. php-amqp

I'm about to implement a system based on PHP that uses RabbitMQ. I can tell that there are 2 mature libraries out there: PECL AMQP and php-amqp. I will be using PHP for both the client as well as the worker. Does anybody have any practical…
phpPhil
  • 906
  • 1
  • 9
  • 28
4
votes
3 answers

Is it possible to get unrouted messages in amqp?

Using the RabbitMQ web UI, When I publish to a topic exchange with no current queue bindings, rabbitmq is saying that the message has been published but not routed. Using amqp.node, when I bind a queue to the exchange and start consuming using "#"…
Kyle Domingo
  • 521
  • 4
  • 14
2
votes
1 answer

Which ActiveMQ transport i should choose?

We use ActiveMQ, php and stomp. And we found that when ActiveMQ rebooted consumers working over stomp can't recognize that connection lost. I found, that only stomp 1.2 support heartbeat. And ActiveMQ uses stomp 1.1 and newest php stomp…
Hayate
  • 653
  • 1
  • 9
  • 25
2
votes
1 answer

How do I accomplish a blocking basic_get call with videlalvaro/php-amqplib

I'm using https://github.com/videlalvaro/php-amqplib to do some rabbitmq work: I'm trying to create a blocking version of basic_get, (or a version of basic_consume that I can call repeatedly and only get one msg each time) that will block until a…
ben schwartz
  • 2,559
  • 1
  • 21
  • 20
2
votes
1 answer

"Socket error: could not connect to host" exception in php-amqp

I have written a function which checks if rabbitmq is running. function getBrokerStatus() { log_message("info", "Checking if broker is running...."); try { $amqpConnection = new AMQPConnection(); …
Hussain
  • 5,057
  • 6
  • 45
  • 71
2
votes
1 answer

Consume multiple queues by priority

I have a Producer sending messages to a topic exchange. Each message contains a routing key. (Apologies for the primitive diagram) P | X /| |\ / | | \ / | | \ Q1 Q2 Q3 Q4 | / / / | / / / | / / / …
agnitio
  • 137
  • 1
  • 10
2
votes
2 answers

RabbitMq: Setting AMQP_AUTODELETE flag on Exchange with PHP AMQP

I'm trying to set AMQP_AUTODELETE flag on my exchange using AMQPExchange::setFlags ( int $flags ) http://php.net/manual/en/amqp.constants.php http://www.php.net/manual/en/amqpexchange.setflags.php does not work... :( $exchange = new…
Scherbius.com
  • 3,396
  • 4
  • 24
  • 44
1
vote
0 answers

php-amqplib: How to prevent infinite loading web page?

I use a cloud service to handle RabbitMQ. The purpose is to send and receive messages from smart objects that use MQTT. All works but... A formPage.php on submit triggers a shellexec command that executes initRpc.php. In initRpc.php this infinite…
merovingio
  • 31
  • 2
1
vote
1 answer

How to add php-amqp in CircleCI config.yml?

I tried to add in my config.yml following command: docker-php-ext-install amqp but CircleCI says: error: /usr/src/php/ext/amqp does not exist This is my full config.yml file: # PHP CircleCI 2.0 configuration file # # Check…
Zotov Egor
  • 11
  • 1
  • 5
1
vote
1 answer

RabbitMq Unacknowledged Messages after Consumer basic_cancel

Ok without going into great detail on the whole system I have setup, The problem I have is when consumers cancels (AMQPChannel->basic_cancel) listening to a queue, it leaves one additional message unacknowledged by this worker. It also doesn't…
ArtisticPhoenix
  • 21,464
  • 2
  • 24
  • 38
1
vote
0 answers

Using wso2mb message broker server with a php client

I trying to connect a php client (using php-amqplib lib) to a server based on wso2mb (wso2 message broker version 3.1.0). I couldnt succed in that when using the amqp_consumer.php and always locked with this error : INFO…
MWY
  • 41
  • 5
1
vote
0 answers

Rabbit amqp connection takes too long time

I've got very strange thing. Connection to my rabbit server takes 0.6 - 3 seconds ... AMQPConnection::connect() works really long time. At my dev and stage machines everything is ok, but on production under slightly highload (publish ~10…
Dmitriy Apollonin
  • 1,418
  • 2
  • 16
  • 30
1
2 3