25 Oct 2002 22:08:09 UTC
- Distribution: Spread-Queue
- Module version: 0.4
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (0 / 0 / 0)
- KwaliteeBus factor: 0
- 75.00% Coverage
- License: unknown
- Activity24 month
- Download (10.36KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Spread::Queue::Manager - coordinate one-of-many message delivery
The provided 'sqm' executable does this:
use Spread::Queue::Manager; my $queue_name = shift @ARGV || die "usage: sqm queue-name"; my $session = new Spread::Queue::Manager($queue_name); $session->run;
The queue manager is responsible for assigning incoming messages (see Spread::Queue::Sender) to registered workers (see Spread::Queue::Worker).
When a message comes in, it is assigned to the first available worker, otherwise it is put into a FIFO queue.
When a worker reports availability, it is sent the first pending message, otherwise it is put into a FIFO queue.
When a message is sent to a worker, the worker should immediately acknowledge receipt. If the worker does not acknowledge, the message will (eventually) be assigned to another worker.
If a queue manager is already running (detected via Spread group membership messages), the new sqm should terminate.
my $session = new Spread::Queue::Manager($queue_name);
Initialize Spread messaging environment, and prepare to act as the queue manager. If queue_name is omitted, environment variable SPREAD_QUEUE will be checked.
Run loop for the queue manager. Does not return unless interrupted.
Jason W. May <firstname.lastname@example.org>
Copyright (C) 2002 Jason W. May. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The license for the Spread software can be found at http://www.spread.org/license
L<Spread::Session> L<Spread::Queue::FIFO> L<Spread::Queue::Sender> L<Spread::Queue::Worker> L<Spread::Queue::ManagedWorker> L<Data::Serializer>
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 63:
'=item' outside of any '=over'
- Around line 393:
You forgot a '=back' before '=head1'
Module Install Instructions
To install Spread::Queue::FIFO, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Spread::Queue::FIFO
For more information on module installation, please visit the detailed CPAN module installation guide.