Skip to content

Instantly share code, notes, and snippets.

@ytnobody
Created February 18, 2017 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ytnobody/503cf2ec9c94f5828f57e81dc3d5bd1e to your computer and use it in GitHub Desktop.
Save ytnobody/503cf2ec9c94f5828f57e81dc3d5bd1e to your computer and use it in GitHub Desktop.
Net::Azure::EventHubsを使ってAzure EventHubs経由でAzure Functionsの関数を起動する事例
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