I am defining an Azure Container Apps job. The job will consume messages from a Service Bus topic subscription. The rule will authenticate using a user assigned identity. The service is defined as follows:
resource platformIoTTransformJob 'Microsoft.App/jobs@2024-03-01' = {
name: platformIoTTransformJobName
location: Location
properties: {
environmentId: environment.id
configuration: {
registries: [
{
server: acr.properties.loginServer
identity: agentIdentity.id
}
]
manualTriggerConfig: {
replicaCompletionCount: 1
parallelism: 1
}
eventTriggerConfig: {
replicaCompletionCount: 1
parallelism: 1
scale: {
minExecutions: 0
maxExecutions: 100
pollingInterval: 30
rules: [
{
name: 'azure-servicebus-topic-rule'
type: 'azure-servicebus'
metadata: any(
{
topicName: platformServiceBus.outputs.TopicName
subscriptionName: platformServiceBus.outputs.SubscriptionName
namespace: platformServiceBus.outputs.ServiceBusNamespaceName
messageCount: '5'
}
)
#disable-next-line BCP037
identity: platformIoTIdentity.id
}
]
}
}
replicaRetryLimit: replicaRetryLimit
replicaTimeout: replicaTimeout
triggerType: 'Event'
}
template: {
containers: [
{
image: platformIoTTransformJobImage
name: platformIoTTransformJobName
env: [
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: AppInsightsInstrumentationKey
}
{
name: 'UserManagedIdentity__ClientId'
value: platformIoTIdentity.properties.clientId
}
]
args: args
command: command
resources: {
cpu: json(cpu)
memory: memory
}
}
]
}
}
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
'${platformIoTIdentity.id}': {}
'${agentIdentity.id}': {}
}
}
}
Where platformServiceBus is a module that puts the required Service Bus resources and permissions and platformIoTIdentity has receiver role on the topic subscription resource.
I'm using the version 2024-03-01 because according to docs it should be available starting from 2024-02-02-preview.
I also tried to specify the identity property in the rule metadata, but without success.
In the Execution history I cannot find any execution even if there are active messages in the queue, so I think that the problem is related to the scale rule.
Where is the problem and how can I troubleshoot it?
I tried to inspect the logs (ContainerAppSystemLogs_CL), but couldn't find anything related to this job


