GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   RabbitMQ server and PHP libs (https://gfy.com/showthread.php?t=1094054)

livexxx 12-24-2012 11:26 AM

RabbitMQ server and PHP libs
 
I'm using RabbitMQ for event processing and want to use a pure PHP library instead of a module. Mainly as we have some windows dev servers and a mish mash of standby boxes.

I'm using an AMQP version at the moment from Robert Harvey, but wanted to know if anyone has that just plain works simple. Posting and retrieving messages for jobs. no need to subscribe and consume.

Any suggestions?

cruxop 12-25-2012 02:17 AM

I use RabbitMQ a lot via Python, and far less via PHP so my knoweledge of those libraries is pretty scattered. However, there's at least one pure-php library for RabbitMQ: https://github.com/BraveSirRobin/amqphp

Did you take a look at that one before?

> Posting and retrieving messages for jobs. no need to subscribe and consume.

AMQP will keep your jobs around if there are no consumers. So if you want to just periodically consume, you can have a cron job start up your consumers then kill it after a while.

If you check out the RabbitMQ page, they have a few different suggestions of how to use their software: http://www.rabbitmq.com/getstarted.html

But essentially they're just wrapping different terminology around the same thing---you have to have consumers and consumers subscribe to a queue and get messages from it.

livexxx 12-26-2012 08:04 PM

Ah yes, great minds and all that :)

BraveSirRobbin is the one I'm using at the moment. The least tolerant of php version and add ons etc. works out of the box which is good, too many geeks running on the nth version of PHP class functions etc.

Ive got some durable queues and several workers consuming the messages. No high msg consumption, just de coupling jobs like sending live stats to customers who you can't count on to have their services up 24/7 and I dont want them to hang my procs on posting them.

I'm more into the atomic message/job at present rather than the logging although have managed to see about 1K/sec messaging as part of our testing using Jmeter just in case we ever get past our current 12 billing messages per sec. :)

glad to see someone else into the messaging server bit as well.

livexxx 02-16-2013 11:26 AM

secondary update, also now ustilising beanstalkd, far simpler to set up and even to run. Seems to manage pretty well and lots of multiple queues a breeze, especially when creating queues on the fly.


All times are GMT -7. The time now is 04:51 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123