NAME
POE::Component::MessageQueue::Storage::DBI -- A storage engine that uses DBI
SYNOPSIS
use POE;
use POE::Component::MessageQueue;
use POE::Component::MessageQueue::Storage::DBI;
use strict;
# For mysql:
my $DB_DSN = 'DBI:mysql:database=perl_mq';
my $DB_USERNAME = 'perl_mq';
my $DB_PASSWORD = 'perl_mq';
my $DB_OPTIONS = undef;
POE::Component::MessageQueue->new({
storage => POE::Component::MessageQueue::Storage::DBI->new({
dsn => $DB_DSN,
username => $DB_USERNAME,
password => $DB_PASSWORD,
options => $DB_OPTIONS
})
});
POE::Kernel->run();
exit;
DESCRIPTION
A storage engine that uses DBI. All messages stored with this backend are persisted.
Performance is increased greatly by wrapping this engine in POE::Component::MessageQueue::Storage::Throttled at the expense of being slower to persist messages.
This module is really just POE::Component::MessageQueue::Storage::Generic with POE::Component::MessageQueue::Storage::Generic::DBI. See the documentation for those modules for more information (primarily POE::Component::MessageQueue::Storage::Generic::DBI).
CONSTRUCTOR PARAMETERS
SEE ALSO
POE::Component::MessageQueue, POE::Component::MessageQueue::Storage, DBI
Other storage engines:
POE::Component::MessageQueue::Storage::Memory, POE::Component::MessageQueue::Storage::BigMemory, POE::Component::MessageQueue::Storage::FileSystem, POE::Component::MessageQueue::Storage::Generic, POE::Component::MessageQueue::Storage::Generic::DBI, POE::Component::MessageQueue::Storage::Throttled, POE::Component::MessageQueue::Storage::Complex, POE::Component::MessageQueue::Storage::Default