[rabbitmq-discuss] PHP message receiving code.

Andrew aph at repido.co.uk
Sat Jul 23 13:18:42 BST 2011


Hi Alvaro

You mentioned in your reply:
> Keep in mind that is using a plain PHP library, not the PECL extension.
The machine I'm working on has the PHP AMQP PECL extension (http://
www.php.net/manual/en/amqp.installation.php) which I think differs
from the examples in the tutorials in that it doesn't seem to support
the callback mechanism that is documented in the examples - or I'm
missing something!
The version I'm using doesn't seems to have the 'channel' object in
the documentation (http://www.php.net/manual/en/book.amqp.php) through
which the call back is set up in the tutorial examples.
Is there an explanation somewhere of the different libraries and what
they support? I'm finding it a bit tricky as a newcomer to establish
which functionality and therefore which library I should be using -
there is one already installed on the server so feel inclined to use
that if at all possible.
It looks like the version I have doesn't provide the callback facility
and I'd have to implement some daemon that periodically polls for
messages and then acts upong them - is this right for the library that
I have?

Thanks & regards,
Andrew

On Jul 22, 11:37 am, Alvaro Videla <videlalv... at gmail.com> wrote:
> +1
>
> I was having lunch so couldn't reply earlier. I think you can just follow what tutorial #1 is doing. Keep in mind that is using a plain PHP library, not the PECL extension.
>
> On Jul 22, 2011, at 12:10 PM, Marek Majkowski wrote:
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > On Fri, Jul 22, 2011 at 09:00, Andrew <a... at repido.co.uk> wrote:
> >> Hi there,
>
> >> Apologies if this is a rather basic question but I'm not sure how to
> >> tackle the implementation of part of a solution using RabbitMQ with
> >> PHP and AMQP library on Linux.
>
> >> I have a component on Linux that will receive messages from a web
> >> site. This component will process each message, performing DB updates
> >> depending on the message contents. My question is around how this
> >> receiving software should poll for messages from RabbitMQ. I wondered
> >> if there is some call-back mechanism that is invoked when a message is
> >> received, though I haven't found anything on this, or do I implement
> >> my receiving software as a daemon that periodically polls the message
> >> queue and processes messages when there are detected in the queue?
>
> > We have few tutorials done in php, is it of any use to you?
> >https://github.com/rabbitmq/rabbitmq-tutorials/tree/master/php
>
> > Cheers,
> >  Marek
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> Sent form my Nokia 1100
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list