Camel Spring Boot

Azure Functions

Invoke and manage Azure Functions.

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-azure-functions-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 23 options, which are listed below.

Name Description Default Type

camel.component.azure-functions.app-service-manager

The AppServiceManager that the management operations use, instead of one that the component creates from the subscriptionId, tenantId and credential options. The option is a com.azure.resourcemanager.appservice.AppServiceManager type.

AppServiceManager

camel.component.azure-functions.autowired-enabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

Boolean

camel.component.azure-functions.client-id

The client ID of the Microsoft Entra application (service principal) that the management operations authenticate with. Used only when clientId, clientSecret and tenantId are all set and credentialType is AZURE_IDENTITY or FUNCTION_KEY.

String

camel.component.azure-functions.client-secret

The client secret of the Microsoft Entra application (service principal) that the management operations authenticate with. Used only when clientId, clientSecret and tenantId are all set and credentialType is AZURE_IDENTITY or FUNCTION_KEY.

String

camel.component.azure-functions.configuration

The component configuration. The option is a org.apache.camel.component.azure.functions.FunctionsConfiguration type.

FunctionsConfiguration

camel.component.azure-functions.connection-timeout

The timeout in milliseconds to connect to the function app for invokeFunction. Must be greater than 0.

30000

Integer

camel.component.azure-functions.credential-type

How the management operations authenticate to Azure. AZURE_IDENTITY and FUNCTION_KEY use the client secret credential when clientId, clientSecret and tenantId are all set, else DefaultAzureCredential; TOKEN_CREDENTIAL uses the tokenCredential option. Not used when appServiceManager is set, nor by invokeFunction, which sends the functionKey or hostKey when one is set.

azure-identity

CredentialType

camel.component.azure-functions.enabled

Whether to enable auto configuration of the azure-functions component. This is enabled by default.

Boolean

camel.component.azure-functions.function-key

The function key that invokeFunction sends in the x-functions-key HTTP header. Takes precedence over hostKey. Not used by the management operations.

String

camel.component.azure-functions.host-key

The host key of the function app that invokeFunction sends in the x-functions-key HTTP header when functionKey is not set. Not used by the management operations.

String

camel.component.azure-functions.http-method

The HTTP method of the invokeFunction request, such as GET, POST, PUT or DELETE. GET and DELETE send no body.

POST

String

camel.component.azure-functions.lazy-start-producer

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

Boolean

camel.component.azure-functions.location

The Azure region of the function app that createFunctionApp creates, such as eastus or westeurope. Required for createFunctionApp.

String

camel.component.azure-functions.operation

The operation to perform. invokeFunction calls an HTTP-triggered function; the other operations manage the function app through Azure Resource Manager and need subscriptionId and resourceGroup. The CamelAzureFunctionsOperation header overrides it.

invokefunction

FunctionsOperations

camel.component.azure-functions.read-timeout

The timeout in milliseconds to wait for the response of the function for invokeFunction (the request timeout of the Java HTTP client): the exchange fails with an HttpTimeoutException when it elapses. Must be greater than 0.

60000

Integer

camel.component.azure-functions.resource-group

The name of the resource group of the function app, used by the management operations: listFunctionApps lists the function apps of this resource group. Required when the operation of the endpoint is a management operation (any operation other than invokeFunction).

String

camel.component.azure-functions.runtime

The language runtime of the function app that createFunctionApp creates: java, node, python or dotnet (case-insensitive), set as the FUNCTIONS_WORKER_RUNTIME app setting. Another value or no value sets no FUNCTIONS_WORKER_RUNTIME.

String

camel.component.azure-functions.runtime-version

The runtime version of the function app that createFunctionApp creates. Not used yet: createFunctionApp always sets the Functions runtime version 4.

String

camel.component.azure-functions.storage-account-connection-string

The connection string of the storage account of the function app that createFunctionApp creates, set as the AzureWebJobsStorage app setting. Required for createFunctionApp.

String

camel.component.azure-functions.subscription-id

The ID of the Azure subscription of the function app, used by the management operations. Required when the operation of the endpoint is a management operation (any operation other than invokeFunction).

String

camel.component.azure-functions.tenant-id

The Microsoft Entra tenant ID of the management operations: used with clientId and clientSecret, and as the tenant of the Azure profile of the management client.

String

camel.component.azure-functions.throw-exception-on-failure

Option to disable throwing the HttpOperationFailedException when the function answers invokeFunction with an HTTP status of 400 or above. This allows you to get all responses regardless of the HTTP status code, with the status in the CamelAzureFunctionsStatusCode header.

true

Boolean

camel.component.azure-functions.token-credential

The TokenCredential that the management operations authenticate with when credentialType is TOKEN_CREDENTIAL. The option is a com.azure.core.credential.TokenCredential type.

TokenCredential