NAME

Net::MessageBus::Message - Pure Perl generic message queue

VERSION

Version 0.04

SYNOPSIS

This module implements a pure perl message bus message object

Example :

use Net::MessageBus::Message;

my $foo = Net::MessageBus::Message->new(
                        type => 'event',
                        payload => { some => 'complex strcture' },
                        sender => 'script1',
                        group => 'backend',
        );
...

SUBROUTINES/METHODS

new

Creates a new Net::MessageBus::Message object

Arguments

  • type = A type assigned to the message

  • payload = A complex perl structure / scalar but it cannot contain any objects

  • sender = the name of the Net::MessageBus client that is sending the message

  • group = the group to which this message belongs

Example :

my $foo = Net::MessageBus::Message->new(
                        type => 'event',
                        payload => { some => 'complex strcture' },
                        sender => 'script1',
                        group => 'backend',
        );

type

Returns the type of the message

Example :

my $type = $Message->type();
    

sender

Returns the sender of the message

Example :

my $type = $Message->sender();
    

group

Returns the group of the message

Example :

my $type = $Message->group();
    

payload

Returns the payload of the message

Example :

my $type = $Message->payload();        

Private methods

serialize

Serializes the message for transport

AUTHOR

Horea Gligan, <gliganh at gmail.com>

BUGS

Please report any bugs or feature requests to bug-net-MessageBus at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-MessageBus. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::MessageBus::Message

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2012 Horea Gligan.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.