NAME
POE::Component::MessageQueue::Storage::FileSystem -- A storage backend that keeps messages on the filesystem
SYNOPSIS
use POE;
use POE::Component::MessageQueue;
use POE::Component::MessageQueue::Storage::FileSystem;
use strict;
# For mysql:
my $DB_DSN = 'DBI:mysql:database=perl_mq';
my $DB_USERNAME = 'perl_mq';
my $DB_PASSWORD = 'perl_mq';
POE::Component::MessageQueue->new({
storage => POE::Component::MessageQueue::Storage::FileSystem->new({
dsn => $DB_DSN,
username => $DB_USERNAME,
password => $DB_PASSWORD,
data_dir => $DATA_DIR,
})
});
POE::Kernel->run();
exit;
DESCRIPTION
A storage backend that builds on top of POE::Component::MessageQueue::Storage::DBI except that the message body is stored on the filesystem.
While I would argue that using this module is less efficient than using POE::Component::MessageQueue::Storage::Complex, using it directly would make sense if persistance was your primary concern. All messages stored via this backend will be persistent regardless of whether they have the persistent flag set or not. Every message is stored, even if it is handled right away and will be removed immediately after having been stored.
CONSTRUCTOR PARAMETERS
- dsn => SCALAR
- username => SCALAR
- password => SCALAR
- options => SCALAR
- data_dir => SCALAR
-
The directory to store the files containing the message body's.
SEE ALSO
DBI, POE::Component::EasyDBI, POE::Component::MessageQueue, POE::Component::MessageQueue::Storage, POE::Component::MessageQueue::Storage::DBI, POE::Component::MessageQueue::Storage::Memory, POE::Component::MessageQueue::Storage::Complex