Created
February 18, 2017 07:27
-
-
Save ytnobody/503cf2ec9c94f5828f57e81dc3d5bd1e to your computer and use it in GitHub Desktop.
Net::Azure::EventHubsを使ってAzure EventHubs経由でAzure Functionsの関数を起動する事例
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use utf8; | |
use Net::Azure::EventHubs; | |
### EventHubsの接続文字列をここに入れる | |
my $connection_string = '...'; | |
### EventHubs向けにイベントを送るClientを作る | |
my $client = Net::Azure::EventHubs->new( | |
connection_string => $connection_string | |
); | |
### 送信するペイロード | |
my $payload = { | |
id => "ytnobody", | |
message => "わいとんはPerlが好きなフレンズなんだね", | |
}; | |
### ペイロードを送る | |
$hub->message($payload)->do; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment