Net::Azure::EventHubs - A Client Class for Azure Event Hubs
use Net::Azure::EventHubs; my $eh = Net::Azure::EventHubs->new( connection_string => 'Endpoint=sb://...', ); ## or use Net::Azure::Authorization::SAS for Authorization my $sas = Net::Azure::Authorization::SAS->new(connection_string => 'Endpoint=sb://...'); $eh = Net::Azure::EventHubs->new(authorizer => $sas); my $req = $eh->message({Location => 'Roppongi', Temperature => 20}); my $res = $req->do;
Net::Azure::EventHubs is a cliant class for Azure Event Hubs.
If you want to know more information about Azure Event Hubs, please see https://msdn.microsoft.com/en-us/library/azure/mt652157.aspx.
my $eh = Net::Azure::EventHubs->new( connection_string => 'Endpoint=sb://...', );
A constructor method.
It requires the 'connection_string' parameter that is a value of 'CONNECTION STRING–PRIMARY KEY' or 'CONNECTION STRING–SECONDARY KEY' on the 'Shared access policies' blade of Event Hubs in Microsoft Azure Portal.
my $req = $eh->message($payload); $req->do;
Returns an object of Net::Azure::EventHub::Reqest.
$payload is a hashref.
Send a message that contains specified payload to Azure Event Hubs when do() method is called.
Copyright (C) ytnobody.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ytnobody <ytnobody@gmail.com>
To install Net::Azure::EventHubs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Azure::EventHubs
CPAN shell
perl -MCPAN -e shell install Net::Azure::EventHubs
For more information on module installation, please visit the detailed CPAN module installation guide.