POE::Component::MessageQueue::Storage::FileSystem -- A storage engine that keeps message bodies on the filesystem
use POE; use POE::Component::MessageQueue; use POE::Component::MessageQueue::Storage::FileSystem; 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'; POE::Component::MessageQueue->new({ storage => POE::Component::MessageQueue::Storage::FileSystem->new({ info_storage => POE::Component::MessageQueue::Storage::DBI->new({ dsn => $DB_DSN, username => $DB_USERNAME, password => $DB_PASSWORD, }), data_dir => $DATA_DIR, }) }); POE::Kernel->run(); exit;
A storage engine that wraps around another storage engine in order to store the message bodies on the file system. The other message properties are stored with the wrapped storage engine.
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 header set to true or not. Every message is stored, even if it is handled right away and will be removed immediately after having been stored.
The storage engine used to store message properties.
The directory to store the files containing the message body's.
Be sure to check also the storage engine you are wrapping!
Ignored. All message bodies are always persisted.
Ignored. All message bodies are kept until handled.
Fully Supported.
POE::Component::MessageQueue, POE::Component::MessageQueue::Storage
Other storage engines:
POE::Component::MessageQueue::Storage::DBI, POE::Component::MessageQueue::Storage::Memory, POE::Component::MessageQueue::Storage::BigMemory, 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
To install POE::Component::MessageQueue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::MessageQueue
CPAN shell
perl -MCPAN -e shell install POE::Component::MessageQueue
For more information on module installation, please visit the detailed CPAN module installation guide.