Net::NATS::Streaming::Client - A Perl client for the NATS Streaming messaging system.
# # Basic Usage # This class is a subclass of Net::NATS::Client and delegates all networking to the parent. $client = Net::NATS::Streaming::Client->new(uri => 'nats://localhost:4222', clientID => 'test_client', clusterID => 'test-cluster'); $client->connect() or die $!; # Simple Async Subscriber $subscription = $client->subscribe_channel({ subject => 'foo' }, sub { my ($message) = @_; printf("Received a message: %s\n", $message->data); }); $self->run; # Simple Publisher $client->publish_channel({ subject => 'foo', data => 'Hello, World!'}); # Unsubscribe $client->unsubscribe_channel($subscription); # Close stream $client->close_stream();
https://github.com/sergeykolychev/perl-nats-streaming
https://github.com/carwynmoore/perl-nats Net::NATS::Client
Sergey Kolychev, <sergeykolychev.github@gmail.com>
Copyright (C) 2017 by Sergey Kolychev <sergeykolychev.github@gmail.com> This library is licensed under Apache 2.0 license https://www.apache.org/licenses/LICENSE-2.0
To install Net::NATS::Streaming::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::NATS::Streaming::Client
CPAN shell
perl -MCPAN -e shell install Net::NATS::Streaming::Client
For more information on module installation, please visit the detailed CPAN module installation guide.