Skip to content

Instantly share code, notes, and snippets.

@mago0
Created April 17, 2012 14:37
Show Gist options
  • Save mago0/2406386 to your computer and use it in GitHub Desktop.
Save mago0/2406386 to your computer and use it in GitHub Desktop.
use POE;
use POE::Component::MessageQueue;
use POE::Component::MessageQueue::Storage::DBI;
use strict;
# For mysql:
my $DB_DSN = 'DBI:Pg:database=pocomq;hostname=127.0.0.1';
my $DB_USERNAME = 'pocomq';
my $DB_PASSWORD = '12345';
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment