AnyMQ::ZeroMQ - AnyMQ adaptor for ZeroMQ
# create a subscriber my $sub_bus = AnyMQ->new_with_traits( traits => [ 'ZeroMQ' ], subscribe_address => 'tcp://localhost:4001', ); # subscribe to topic my $sub_topic = $sub_bus->topic('ping'); my $listener = $sub_bus->new_listener($sub_topic); $listener->poll(sub { "got ping event!" }); # create a publisher my $pub_bus = AnyMQ->new_with_traits( traits => ['ZeroMQ'], publish_address => 'tcp://localhost:4000', # accepts any address that ZeroMQ supports ); my $pub_topic = $pub_bus->topic('ping'); $pub_topic->publish({ foo => 'bar' });
Mischa Spiegelmock, <revmischa at cpan.org>
<revmischa at cpan.org>
Please use the GitHub issue tracker
AnyMQ, ZeroMQ::PubSub
AnyMQ, AnyEvent::ZeroMQ
Copyright 2011 Mischa Spiegelmock.
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.
To install AnyMQ::ZeroMQ, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyMQ::ZeroMQ
CPAN shell
perl -MCPAN -e shell install AnyMQ::ZeroMQ
For more information on module installation, please visit the detailed CPAN module installation guide.