more random code
This commit is contained in:
Родитель
2fef590d45
Коммит
afea6285d1
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"bindings": [
|
||||
{
|
||||
"type": "eventHubTrigger",
|
||||
"name": "IoTHubMessages",
|
||||
"direction": "in",
|
||||
"eventHubName": "samples-workitems",
|
||||
"connection": "esphub_iothubroutes_esptest_EVENTHUB",
|
||||
"cardinality": "many",
|
||||
"consumerGroup": "$Default"
|
||||
}
|
||||
],
|
||||
"scriptFile": "../dist/IoTHub_EventHub1/index.js"
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import { AzureFunction, Context } from "@azure/functions"
|
||||
|
||||
const IoTHubTrigger: AzureFunction = async function (context: Context, IoTHubMessages: any[]): Promise<void> {
|
||||
context.log(`Eventhub trigger function called for message array: ${IoTHubMessages}`);
|
||||
|
||||
IoTHubMessages.forEach(message => {
|
||||
context.log(`Processed message: ${message}`);
|
||||
});
|
||||
};
|
||||
|
||||
export default IoTHubTrigger;
|
|
@ -0,0 +1 @@
|
|||
Test Message
|
Загрузка…
Ссылка в новой задаче