Investigative information
Please provide the following:
- Timestamp: 10th of October 2018 9:40 to 10:00
- Function App version (1.0 or 2.0): 2.0
- Function App name: testfinsb
- Function name(s) (as appropriate):ServiceBusQueueTriggerCSharp1 , ServiceBusQueueTriggerCSharp2
- Invocation ID: 692b8b7e-8eef-4898-bfa9-d79de2bbf5fd
- Region: Central US
Repro steps
Provide the steps required to reproduce the problem:
- Create a Service Bus with two Queues. One has partitions the other doesn't.
- Create a v2 Function App with two Functions that trigger off the individual queues.
(These are in the portal. Will test with pre-compiled assemblies as well.)
E.G
{
"bindings": [
{
"name": "myQueueItem",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "testqueue", // This is the queue with partitioning enabled.
"connection": "fintestoutput_RootManageSharedAccessKey_SERVICEBUS"
}
]
}
{
"bindings": [
{
"name": "myQueueItem",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "outqueue", // This is the queue that doesn't have partioning enabled.
"connection": "fintestoutput_RootManageSharedAccessKey_SERVICEBUS"
}
],
"disabled": false
}
-
Create a test app to send messages to the queue.
E.G https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal#send-and-receive-messages
-
Send 5 messages to each queue.
-
Note that the logs in the Portal console and at D:\home\LogFiles\Application\Functions\function log these invocations.
E.G.
2018-10-10T09:44:38.460 [Information] C# ServiceBus queue trigger function processed message: Message 2
2018-10-10T09:44:38.460 [Information] Executed 'Functions.ServiceBusQueueTriggerCSharp2' (Succeeded, Id=692b8b7e-8eef-4898-bfa9-d79de2bbf5fd)
2018-10-10T09:44:38.955 [Information] Executing 'Functions.ServiceBusQueueTriggerCSharp2' (Reason='New ServiceBus message detected on 'outqueue'.', Id=2e10f299-b6a7-4093-b882-366db302019c)
- Test the Function from the Portal.
- Note that this invocation is also logged.
E.G.
2018-10-10T09:47:39.098 [Information] Executing 'Functions.ServiceBusQueueTriggerCSharp2' (Reason='This function was programmatically called via the host APIs.', Id=28102c9f-7357-4250-aa74-efa39046d7f9)
2018-10-10T09:47:39.104 [Information] C# ServiceBus queue trigger function processed message: Service Bus Message
2018-10-10T09:47:39.106 [Information] Executed 'Functions.ServiceBusQueueTriggerCSharp2' (Succeeded, Id=28102c9f-7357-4250-aa74-efa39046d7f9)
- Note that the Monitor tab has only recorded the Portal invocation.

Expected behavior
Provide a description of the expected behavior.
After Step 4 I would expect that all messages processed would be logged in the Monitor Tab.
Actual behavior
Provide a description of the actual behavior observed.
Only the invocations from Step 6 are logged.
Please note that running this query in Analytics does show the invocations.
traces
| where timestamp > ago(1d)
Executed 'Functions.ServiceBusQueueTriggerCSharp1' (Succeeded, Id=ca5be087-edb0-436b-ba47-6d01bb7c03df)

Executed 'Functions.ServiceBusQueueTriggerCSharp2' (Succeeded, Id=babe1d53-edd6-46ea-8106-3037c03f9aef)

Known workarounds
No workarounds exist.
Related information
Provide any related information
- Programming language used - CSharp
- Links to source - Standard Service Bus Template
- Bindings used
Source
using System;
using System.Threading.Tasks;
public static void Run(string myQueueItem, ILogger log)
{
log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
}
Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem:
(These are in the portal. Will test with pre-compiled assemblies as well.)
E.G
{
"bindings": [
{
"name": "myQueueItem",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "testqueue", // This is the queue with partitioning enabled.
"connection": "fintestoutput_RootManageSharedAccessKey_SERVICEBUS"
}
]
}
{
"bindings": [
{
"name": "myQueueItem",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "outqueue", // This is the queue that doesn't have partioning enabled.
"connection": "fintestoutput_RootManageSharedAccessKey_SERVICEBUS"
}
],
"disabled": false
}
Create a test app to send messages to the queue.
E.G https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal#send-and-receive-messages
Send 5 messages to each queue.
Note that the logs in the Portal console and at D:\home\LogFiles\Application\Functions\function log these invocations.
E.G.
2018-10-10T09:44:38.460 [Information] C# ServiceBus queue trigger function processed message: Message 2
2018-10-10T09:44:38.460 [Information] Executed 'Functions.ServiceBusQueueTriggerCSharp2' (Succeeded, Id=692b8b7e-8eef-4898-bfa9-d79de2bbf5fd)
2018-10-10T09:44:38.955 [Information] Executing 'Functions.ServiceBusQueueTriggerCSharp2' (Reason='New ServiceBus message detected on 'outqueue'.', Id=2e10f299-b6a7-4093-b882-366db302019c)
E.G.
2018-10-10T09:47:39.098 [Information] Executing 'Functions.ServiceBusQueueTriggerCSharp2' (Reason='This function was programmatically called via the host APIs.', Id=28102c9f-7357-4250-aa74-efa39046d7f9)
2018-10-10T09:47:39.104 [Information] C# ServiceBus queue trigger function processed message: Service Bus Message
2018-10-10T09:47:39.106 [Information] Executed 'Functions.ServiceBusQueueTriggerCSharp2' (Succeeded, Id=28102c9f-7357-4250-aa74-efa39046d7f9)
Expected behavior
Provide a description of the expected behavior.
After Step 4 I would expect that all messages processed would be logged in the Monitor Tab.
Actual behavior
Provide a description of the actual behavior observed.
Only the invocations from Step 6 are logged.
Please note that running this query in Analytics does show the invocations.
traces
| where timestamp > ago(1d)
Executed 'Functions.ServiceBusQueueTriggerCSharp1' (Succeeded, Id=ca5be087-edb0-436b-ba47-6d01bb7c03df)

Executed 'Functions.ServiceBusQueueTriggerCSharp2' (Succeeded, Id=babe1d53-edd6-46ea-8106-3037c03f9aef)

Known workarounds
No workarounds exist.
Related information
Provide any related information
Source