-
-
05 Jun 2017 14:11:33 UTC
- Distribution: POE-Component-MessageQueue
- Module version: 0.2.3
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (428 / 46 / 0)
- Kwalitee
Bus factor: 1- 66.78% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (75.43KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 3 contributors- David Snopek (http://www.hackyourlife.org)
-
Paul Driver
-
Daisuke Maki
- Dependencies
- Best
- Carp
- DBD::SQLite
- DBI
- Data::Dumper
- Data::UUID
- Event::Notify
- Exception::Class::DBI
- Exception::Class::TryCatch
- File::Temp
- Heap
- Heap::Fibonacci
- IO::File
- IO::String
- Moose
- MooseX::MultiInitArg
- Net::EmptyPort
- Net::Stomp
- POE
- POE::Component::Generic
- POE::Component::Logger
- POE::Component::Server::TCP
- POE::Filter::Stomp
- POE::Wheel::ReadWrite
- Test::Exception
- Test::MockObject
- Test::More
- YAML
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
POE::Component::Server::Stomp - A generic Stomp server for POE
SYNOPSIS
use POE qw(Component::Server::Stomp); use Net::Stomp::Frame; use strict; POE::Component::Server::Stomp->new( HandleFrame => \&handle_frame, ClientDisconnected => \&client_disconnected, ClientErrorr => \&client_error ); POE::Kernel->run(); exit; sub handle_frame { my ($kernel, $heap, $frame) = @_[ KERNEL, HEAP, ARG0 ]; print "Recieved frame:\n"; print $frame->as_string() . "\n"; # allow Stomp clients to connect by playing along. if ( $frame->command eq 'CONNECT' ) { my $response = Net::Stomp::Frame->new({ command => 'CONNECTED' }); $heap->{client}->put( $response->as_string . "\n" ); } } sub client_disconnected { my ($kernel, $heap) = @_[ KERNEL, HEAP ]; print "Client disconnected\n"; } sub client_error { my ($kernel, $name, $number, $message) = @_[ KERNEL, ARG0, ARG1, ARG2 ]; print "ERROR: $name $number $message\n"; }
DESCRIPTION
A thin layer over POE::Component::Server::TCP that parses out Net::Stomp::Frames. The synopsis basically covers everything you are capable to do.
For information on the STOMP protocol:
http://stomp.codehaus.org/Protocol
For a full-fledged message queue that uses this module:
SEE ALSO
POE::Component::Server::TCP, POE::Filter::Stomp, Net::Stomp
BUGS
Probably.
AUTHORS
Copyright 2007-2010 David Snopek.
Module Install Instructions
To install POE::Component::MessageQueue, copy and paste the appropriate command in to your terminal.
cpanm POE::Component::MessageQueue
perl -MCPAN -e shell install POE::Component::MessageQueue
For more information on module installation, please visit the detailed CPAN module installation guide.