Skip to content

Further Information on the Function Generator

Karlo K edited this page Dec 11, 2020 · 1 revision

Configuration JSON

Below is an overview of the additional features that can be set when creating the Persistor folder structure. Almost all of these add another App Configuration variable in the local.settings.json. Some of those will need to be configured after the fact like the other variables, some will be immediately filled with the setting given in the dictionary.

Variable Name Relevant Persistor Types Possible Values App Configuration Settings Added App Configuration Setting Automatically Set?
invoker SERVICE BUS (PULL)
EVENT HUB (PULL)
"true"
"false"
"FUNC_TO_INVOKE"
(An HTTP link to the Azure Function that the Invoker will trigger.)
"INVOKER_TIMEOUT"
(Sets the amount of time, in seconds, the invoker HTTP function will wait for a response.)
"DELAY_BETWEEN_FUNCS"
(Signifies the delay between each function invocation, in seconds.)
-
(If not defined, "INVOKER_TIMEOUT" defaults to 75 seconds, and "DELAY_BETWEEN_FUNCS" defaults to 0.25 seconds.)
cardinality EVENT HUB (BINDING) "one"
"many"
In addition, modifies the "function.json" file adding the exact same parameter, setting it to the chosen setting. +
(Automatically set to what was defined in this field.)
sb_type SERVICE BUS (PULL)
SERVICE BUS (BINDING)
"queue"
"topic"
If this setting is not set, the generated Azure App Folder structure will include both the queueName and topic/subscriptionName fields in the function app's local.settings.json and/or function.json files. If this setting is given, the redundant fields will be removed.

It is HIGHLY RECOMMENDED you set this setting properly beforehand to save yourself deleting unnecessary fields manually. Especially helpful if using the Service Bus BINDING variant.
-
(Although the superfluous one is removed, the actual fields associated with the Service Bus, like namespace connection string, topic/subscription/name still need to be manually set.)
append ALL SERVICES "true"
"false"
"APPEND"
(Determines whether or not to use an append blob.)
+
(Automatically set to what was defined in this field.)
timed_append ALL SERVICES "true"
"false"
"TIMED_APPEND"
(Determines whether or not the append blob should constantly be created based on the current execution time.)
+
(Automatically set to what was defined in this field.)
metadata EVENT HUB (BINDING)
EVENT HUB (PULL)
SERVICE BUS (BINDING)
SERVICE BUS (PULL)
"true"
"false"
"GET_METADATA"
(Determines whether or not to store messages alongside the message/event payload. In the case of the Service Bus, it is the custom, user-defined metadata, wheras with the Event Hub, the metadata generated at the time of arrival is stored.)
+
(Automatically set to what was defined in this field.)
output_binding ALL BINDING SERVICES "true"
"false"
"PERSISTOR_OUTPUT_BINDING"
(Determines whether or not the deployed function is set up to have an output binding to a blob as the store method.)

It is HIGHLY RECOMMENDED to set this setting to "true" if you do not intend to use Append Blobs. Especially helpful with the Event Hub BINDING variant, performance-wise.
+
(Automatically set to what was defined in this field.)

If the setting is set but mismatched to its relevant Persistor type, or the value given isn't among the valid ones, the setting will simply be ignored.

Running the Generator on existing Function App folders

As mentioned earlier, the Generator will not overwrite or delete anything in an existing Folder App structure, or the local.settings.json files. Instead, it will merely add additional App Configuration settings needed by the Persistor.

If you are updating, it will not overwrite the previously set values in the local.settings.json. (The only exception being the configuration setting that has a + under the "App Configuration Setting Automatically Set?" column in the table above -- those will be overwritten should the user specify another value in the generator_config file for a given function.)