
NetSDS::App::QueueProcessor - queue processing server framework

-----------------------------
# Configuration file
# Queue server IP and port
queue_server = "127.0.0.1:22201"
# Pulling queue name
queue_name = "myq"
# Processing bandwidth (messages per second)
bandwidth = 2
# Timeout on idle loops
idle_timeout = 3
-----------------------------
QProc->run(conf_file => './qproc.conf');
1;
package QProc;
use Data::Dumper;
use base 'NetSDS::App::QueueProcessor';
# Message processing logic
sub process {
my ( $self, $msg ) = @_;
# Just dump message structure
print Dumper($msg);
}
1;

NetSDS::App::QueueProcessor module implements framework for applications processing messages arriving from MemcacheQ queue server.

Internal method implementing common startup actions.
Internal method for application logic.
This is internal method that implements JSON-RPC call processing.

See samples/app_qproc.pl appliction.


None

Michael Bochkaryov <misha@rattler.kiev.ua>

Copyright (C) 2008-2009 Michael Bochkaryov
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA