NAME

POE::Component::MessageQueue::Storage::FileSystem -- A storage engine that keeps message bodies on the filesystem

SYNOPSIS

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;

DESCRIPTION

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.

CONSTRUCTOR PARAMETERS

info_storage => POE::Component::MessageQueue::Storage

The storage engine used to store message properties.

data_dir => SCALAR

The directory to store the files containing the message body's.

SUPPORTED STOMP HEADERS

Be sure to check also the storage engine you are wrapping!

persistent

Ignored. All message bodies are always persisted.

expire-after

Ignored. All message bodies are kept until handled.

deliver-after

Fully Supported.

SEE ALSO

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