0
votes

I have build the following simple function that picks up messages from a service bus and processes them to be sent off to Firebase which in turn will trigger a mobile notification.

[FunctionName("ProcessServiceBusMessageAsFirebaseNotification")]
        public static async void Run(
            [ServiceBusTrigger("testqueue")]
            string myQueueItem,
            ILogger log)
        {
            if (FirebaseApp.DefaultInstance == null)
            {
                var serviceAccount = BuildServiceAccount();

                FirebaseApp.Create(new AppOptions()
                {
                    Credential = GoogleCredential.FromJson(serviceAccount)
                });
            }

            var message = JsonSerializer.Deserialize<MulticastMessage>(myQueueItem);

            var messaging = await FirebaseMessaging.DefaultInstance.SendMulticastAsync(message);

            log.LogInformation("Notifications sent to devices " + string.Join(",", message.Tokens));
        }

The function is fine and works as expected when I run it against the service bus locally in visual studio, however, when I deploy this to a Windows Function App service it seems to be confusing the input binding with an output as shown below:

Display in Azure portal for the function app This means that the function never fires at all and does not pick up messages from our service bus as it does locally.

If I build an app directly in the Azure Portal I can see that it generates the necessary config in the function.json file to determine that the myQueueItem property is indeed an input property, however, this is not a viable solution as we want to take advantages of the benefits of keeping our function code in source control and having it deployed via Azure Devops CI/CD pipelines.

Is there any way of enforcing the compiled function.json file (as this is built automatically by the framework) to contain the correct in definition for this property?

I've read all of the documentation that seems to be available around this and tried several of the examples on the Microsoft websites however none of them appear to function correctly.

Thanks in Advance.

1
Which version of Azure Functions are you using? I've seen this happen if no direction's specified in function.json but only with v1. - MarkXA
I'm using version 3. This is the bit I also don't understand. A developer shouldn't be building or editing the function.json file as it is a generated file on build. - jezzipin
It was a bug in the tooling in v1. Worth checking the function.json that gets generated, found this issue with v3 as well: github.com/Azure/Azure-Functions/issues/1528 - MarkXA
So the function.json file definitely doesn't contain an in definition so I guess my question would be how can I get around this? It's not like I could make a pre-generated function.json file. - jezzipin
If you use C # library development locally and deploy the function app to azure, then function.json is not the key. The function based on .net core you can write directly on the portal is crx instead of the C # library. For the C # class library, the definition and direction of the binding are in the compiled dll file, and function.json only provides a reference. - Cindy Pau

1 Answers

0
votes

Update:

This time I use service bus trigger instead of using a input binding. Still get the error:

enter image description here

But it still doesn't matter. The service bus trigger works fine both on local and azure.

This is the code of my service bus trigger:

using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;

namespace FunctionApp50
{
    public static class Function1
    {
        [FunctionName("Function1")]
        public static void Run([ServiceBusTrigger("test", Connection = "str")]string myQueueItem, ILogger log)
        {
            log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
        }
    }
}

My local.settings.json:

enter image description here

And I create a console app to send message to service bus:

using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.ServiceBus;

namespace SendMessageToServiceBusQueue
{
    class Program
    {
        const string ServiceBusConnectionString = "Endpoint=sb://testbowman.xxxxxxArb7VvKc=";
        const string QueueName = "test";
        static IQueueClient queueClient;
        public static async Task Main(string[] args)
        {
            const int numberOfMessages = 10;
            queueClient = new QueueClient(ServiceBusConnectionString, QueueName);

            Console.WriteLine("======================================================");
            Console.WriteLine("Press ENTER key to exit after sending all the messages.");
            Console.WriteLine("======================================================");

            // Send messages.
            await SendMessagesAsync(numberOfMessages);

            Console.ReadKey();

            await queueClient.CloseAsync();
        }
        static async Task SendMessagesAsync(int numberOfMessagesToSend)
        {
            try
            {
                for (var i = 0; i < numberOfMessagesToSend; i++)
                {
                    // Create a new message to send to the queue.
                    string messageBody = $"Message {i}";
                    var message = new Message(Encoding.UTF8.GetBytes(messageBody));

                    // Write the body of the message to the console.
                    Console.WriteLine($"Sending message: {messageBody}");

                    // Send the message to the queue.
                    await queueClient.SendAsync(message);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine($"{DateTime.Now} :: Exception: {exception.Message}");
            }
        }
    }
}

I publish my function app to azure and after that I set the str in this place:(dont forget to save the edit.)

enter image description here

After all these preparations are completed, I use the console app to send message to azure service bus. It works fine at last, this is my log:(No logs on portal, I must to go phycial path to get the log file.)

enter image description here

My log file:

2020-05-19T09:05:16.424 [Information] Executing 'Function1' (Reason='', Id=66047beb-f16c-4898-91bc-1f0c89f5430e)
2020-05-19T09:05:16.425 [Information] Executing 'Function1' (Reason='', Id=b80bec3b-647c-4eaa-8b73-81b8806ff734)
2020-05-19T09:05:16.426 [Information] Executing 'Function1' (Reason='', Id=0ecc3563-d2ba-468e-ae84-d79e870ba5c4)
2020-05-19T09:05:16.426 [Information] Executing 'Function1' (Reason='', Id=d35739a8-d155-43e2-abc8-a9c6e74ee164)
2020-05-19T09:05:16.427 [Information] Executing 'Function1' (Reason='', Id=ec103570-1f53-4b21-9a6c-e30f1c88b5ca)
2020-05-19T09:05:16.435 [Information] Trigger Details: MessageId: 669a1238b0e643d5996ba4bc6f41de9e, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:31 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.484 [Information] Executing 'Function1' (Reason='', Id=afdce92c-1a2a-445c-bde3-7791960b3657)
2020-05-19T09:05:16.485 [Information] Trigger Details: MessageId: f1d1d1e4dfa34ea3b177c9669d60cfea, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:32 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.485 [Information] Executing 'Function1' (Reason='', Id=54be305a-203c-4050-831d-75a1ac55cdb0)
2020-05-19T09:05:16.485 [Information] Trigger Details: MessageId: 15574c72d6c74c46b4643e4b8beca761, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:33 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.486 [Information] Executing 'Function1' (Reason='', Id=17a0098a-1a83-407c-9c9b-60341138b10e)
2020-05-19T09:05:16.486 [Information] Trigger Details: MessageId: 097ab39382644e3cab0624b4038a2a40, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:33 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.486 [Information] Executing 'Function1' (Reason='', Id=97b9d1b3-d30b-42ad-b545-e2645f49f25a)
2020-05-19T09:05:16.487 [Information] Trigger Details: MessageId: 4c4b48ae16cc48a2ac11aeb654a31812, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:33 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.493 [Information] Executing 'Function1' (Reason='', Id=011cd5d6-6265-4fba-8170-e385d5da41f5)
2020-05-19T09:05:16.493 [Information] Trigger Details: MessageId: 1746f94f65d746c28141750adecdd78d, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:34 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.493 [Information] Executing 'Function1' (Reason='', Id=47789d24-4bf1-4a86-98d6-c561465c6452)
2020-05-19T09:05:16.494 [Information] Trigger Details: MessageId: e5e03f3e23754b77ae512aa453903f72, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:17 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.494 [Information] Executing 'Function1' (Reason='', Id=df3f8fc7-33ae-446c-b6a1-7609d6e4a40c)
2020-05-19T09:05:16.494 [Information] Trigger Details: MessageId: 64897e3ea49941798023027b776eb14d, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:18 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.495 [Information] Executing 'Function1' (Reason='', Id=0aee0dd6-c33c-4388-a2f4-4879f26cdaf0)
2020-05-19T09:05:16.495 [Information] Trigger Details: MessageId: 99a11fee22364097b630885d3fc9e6f2, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:18 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.495 [Information] Executing 'Function1' (Reason='', Id=1bd52bfc-673e-4af7-856f-dedd814ce54c)
2020-05-19T09:05:16.495 [Information] Trigger Details: MessageId: 0f39ce1a4dc149ecb03a662d6edeb7b4, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:18 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.496 [Information] Executing 'Function1' (Reason='', Id=50713ea8-4090-4e90-b8e9-2d4c7d1b8944)
2020-05-19T09:05:16.496 [Information] Trigger Details: MessageId: ffc8f84a5b3d4df5ae79c20cc34245c6, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:19 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.496 [Information] Executing 'Function1' (Reason='', Id=d893c015-9f21-4397-b5c6-190fb6c1f40f)
2020-05-19T09:05:16.496 [Information] Trigger Details: MessageId: 4638c45788bc4b71a7491eb2d327bf23, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:19 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.504 [Information] C# ServiceBus queue trigger function processed message: Message 1
2020-05-19T09:05:16.516 [Information] Executed 'Function1' (Succeeded, Id=b80bec3b-647c-4eaa-8b73-81b8806ff734)
2020-05-19T09:05:16.537 [Information] Trigger Details: MessageId: 7c79f2e9b4a7429cbb1025cc2f4efa3e, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:31 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.543 [Information] C# ServiceBus queue trigger function processed message: Message 5
2020-05-19T09:05:16.725 [Information] C# ServiceBus queue trigger function processed message: Message 6
2020-05-19T09:05:16.725 [Information] Trigger Details: MessageId: 5aafffba4c1d455a96058be5853f9104, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:32 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.732 [Information] C# ServiceBus queue trigger function processed message: Message 7
2020-05-19T09:05:16.732 [Information] Executed 'Function1' (Succeeded, Id=17a0098a-1a83-407c-9c9b-60341138b10e)
2020-05-19T09:05:16.744 [Information] C# ServiceBus queue trigger function processed message: Message 8
2020-05-19T09:05:16.744 [Information] Executed 'Function1' (Succeeded, Id=97b9d1b3-d30b-42ad-b545-e2645f49f25a)
2020-05-19T09:05:16.744 [Information] C# ServiceBus queue trigger function processed message: Message 9
2020-05-19T09:05:16.745 [Information] Executed 'Function1' (Succeeded, Id=011cd5d6-6265-4fba-8170-e385d5da41f5)
2020-05-19T09:05:16.745 [Information] C# ServiceBus queue trigger function processed message: Message 0
2020-05-19T09:05:16.745 [Information] Executed 'Function1' (Succeeded, Id=47789d24-4bf1-4a86-98d6-c561465c6452)
2020-05-19T09:05:16.745 [Information] C# ServiceBus queue trigger function processed message: Message 1
2020-05-19T09:05:16.746 [Information] Executed 'Function1' (Succeeded, Id=df3f8fc7-33ae-446c-b6a1-7609d6e4a40c)
2020-05-19T09:05:16.752 [Information] C# ServiceBus queue trigger function processed message: Message 2
2020-05-19T09:05:16.752 [Information] Executed 'Function1' (Succeeded, Id=0aee0dd6-c33c-4388-a2f4-4879f26cdaf0)
2020-05-19T09:05:16.752 [Information] C# ServiceBus queue trigger function processed message: Message 3
2020-05-19T09:05:16.753 [Information] Executed 'Function1' (Succeeded, Id=1bd52bfc-673e-4af7-856f-dedd814ce54c)
2020-05-19T09:05:16.753 [Information] C# ServiceBus queue trigger function processed message: Message 4
2020-05-19T09:05:16.753 [Information] Executed 'Function1' (Succeeded, Id=50713ea8-4090-4e90-b8e9-2d4c7d1b8944)
2020-05-19T09:05:16.754 [Information] C# ServiceBus queue trigger function processed message: Message 5
2020-05-19T09:05:16.754 [Information] Executed 'Function1' (Succeeded, Id=d893c015-9f21-4397-b5c6-190fb6c1f40f)
2020-05-19T09:05:16.754 [Information] C# ServiceBus queue trigger function processed message: Message 3
2020-05-19T09:05:16.754 [Information] Executed 'Function1' (Succeeded, Id=d35739a8-d155-43e2-abc8-a9c6e74ee164)
2020-05-19T09:05:16.764 [Information] Trigger Details: MessageId: ad7316293310452bad22919cf8cd307f, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:32 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.764 [Information] C# ServiceBus queue trigger function processed message: Message 4
2020-05-19T09:05:16.764 [Information] Executed 'Function1' (Succeeded, Id=ec103570-1f53-4b21-9a6c-e30f1c88b5ca)
2020-05-19T09:05:16.765 [Information] C# ServiceBus queue trigger function processed message: Message 0
2020-05-19T09:05:16.765 [Information] Executed 'Function1' (Succeeded, Id=66047beb-f16c-4898-91bc-1f0c89f5430e)
2020-05-19T09:05:16.774 [Information] Executed 'Function1' (Succeeded, Id=afdce92c-1a2a-445c-bde3-7791960b3657)
2020-05-19T09:05:16.775 [Information] Executed 'Function1' (Succeeded, Id=54be305a-203c-4050-831d-75a1ac55cdb0)
2020-05-19T09:05:16.781 [Information] Trigger Details: MessageId: b9358c40afda4d5d8269cb18361b0c31, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:01:32 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.781 [Information] C# ServiceBus queue trigger function processed message: Message 2
2020-05-19T09:05:16.782 [Information] Executed 'Function1' (Succeeded, Id=0ecc3563-d2ba-468e-ae84-d79e870ba5c4)
2020-05-19T09:05:16.829 [Information] Executing 'Function1' (Reason='', Id=d1431d77-cb73-4708-8003-ae333a62ca64)
2020-05-19T09:05:16.830 [Information] Trigger Details: MessageId: 40b242547f794badac3e9997ba25d6a7, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:19 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.830 [Information] Executing 'Function1' (Reason='', Id=0a81aeb0-2d57-432b-8a7a-7d901f83ebd4)
2020-05-19T09:05:16.830 [Information] Trigger Details: MessageId: 24e97d494ded440ea55ad77bfe04fa46, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:20 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.831 [Information] Executing 'Function1' (Reason='', Id=f86dffc2-4ca0-45b3-850a-4bd72af33cb6)
2020-05-19T09:05:16.831 [Information] Trigger Details: MessageId: 08dcb123ac384966b3aa8baa2582d505, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:20 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.831 [Information] Executing 'Function1' (Reason='', Id=55488d4d-a3d8-4d4c-b882-26db30d69656)
2020-05-19T09:05:16.832 [Information] Trigger Details: MessageId: 6deab028d63b4f17acc33903a2ac4647, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:03:20 AM, LockedUntilUtc: 5/19/2020 9:05:46 AM, SessionId: (null)
2020-05-19T09:05:16.832 [Information] C# ServiceBus queue trigger function processed message: Message 6
2020-05-19T09:05:16.832 [Information] Executed 'Function1' (Succeeded, Id=d1431d77-cb73-4708-8003-ae333a62ca64)
2020-05-19T09:05:16.838 [Information] C# ServiceBus queue trigger function processed message: Message 7
2020-05-19T09:05:16.839 [Information] Executed 'Function1' (Succeeded, Id=0a81aeb0-2d57-432b-8a7a-7d901f83ebd4)
2020-05-19T09:05:16.839 [Information] C# ServiceBus queue trigger function processed message: Message 8
2020-05-19T09:05:16.839 [Information] Executed 'Function1' (Succeeded, Id=f86dffc2-4ca0-45b3-850a-4bd72af33cb6)
2020-05-19T09:05:16.840 [Information] C# ServiceBus queue trigger function processed message: Message 9
2020-05-19T09:05:16.840 [Information] Executed 'Function1' (Succeeded, Id=55488d4d-a3d8-4d4c-b882-26db30d69656)
2020-05-19T09:05:26.588 [Information] Executing 'Function1' (Reason='', Id=51eb767c-6739-4a8f-a28b-8e63d4fbbddc)
2020-05-19T09:05:26.589 [Information] Trigger Details: MessageId: de38d7bba5d6482ba4ef354a56a3be57, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:26 AM, LockedUntilUtc: 5/19/2020 9:05:56 AM, SessionId: (null)
2020-05-19T09:05:26.589 [Information] C# ServiceBus queue trigger function processed message: Message 0
2020-05-19T09:05:26.589 [Information] Executed 'Function1' (Succeeded, Id=51eb767c-6739-4a8f-a28b-8e63d4fbbddc)
2020-05-19T09:05:26.888 [Information] Executing 'Function1' (Reason='', Id=a1caff33-7d0b-40bf-9b38-2f2018a08906)
2020-05-19T09:05:26.889 [Information] Trigger Details: MessageId: 31faf6ab198f4f0e9ccbc88c45c4ca2b, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:26 AM, LockedUntilUtc: 5/19/2020 9:05:56 AM, SessionId: (null)
2020-05-19T09:05:26.889 [Information] C# ServiceBus queue trigger function processed message: Message 1
2020-05-19T09:05:26.889 [Information] Executed 'Function1' (Succeeded, Id=a1caff33-7d0b-40bf-9b38-2f2018a08906)
2020-05-19T09:05:27.177 [Information] Executing 'Function1' (Reason='', Id=376bd08a-ad16-43f2-9c8a-5f0a1e31aad7)
2020-05-19T09:05:27.177 [Information] Trigger Details: MessageId: 64082c6e2fe24979b7820b5a0a3d5de8, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:27 AM, LockedUntilUtc: 5/19/2020 9:05:57 AM, SessionId: (null)
2020-05-19T09:05:27.177 [Information] C# ServiceBus queue trigger function processed message: Message 2
2020-05-19T09:05:27.178 [Information] Executed 'Function1' (Succeeded, Id=376bd08a-ad16-43f2-9c8a-5f0a1e31aad7)
2020-05-19T09:05:27.468 [Information] Executing 'Function1' (Reason='', Id=b39900c6-e273-404c-8413-3e99a00e773a)
2020-05-19T09:05:27.468 [Information] Trigger Details: MessageId: 387224421a2a429c9731770cc82194dc, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:27 AM, LockedUntilUtc: 5/19/2020 9:05:57 AM, SessionId: (null)
2020-05-19T09:05:27.468 [Information] C# ServiceBus queue trigger function processed message: Message 3
2020-05-19T09:05:27.469 [Information] Executed 'Function1' (Succeeded, Id=b39900c6-e273-404c-8413-3e99a00e773a)
2020-05-19T09:05:27.759 [Information] Executing 'Function1' (Reason='', Id=3df9764a-99e5-4957-ac7f-47c57620654c)
2020-05-19T09:05:27.759 [Information] Trigger Details: MessageId: b1e3ee11beba435d80e0be8c10aa9ed4, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:27 AM, LockedUntilUtc: 5/19/2020 9:05:57 AM, SessionId: (null)
2020-05-19T09:05:27.760 [Information] C# ServiceBus queue trigger function processed message: Message 4
2020-05-19T09:05:27.760 [Information] Executed 'Function1' (Succeeded, Id=3df9764a-99e5-4957-ac7f-47c57620654c)
2020-05-19T09:05:28.049 [Information] Executing 'Function1' (Reason='', Id=d5092cb3-97ab-4cf2-9506-6a0bac65c9fb)
2020-05-19T09:05:28.066 [Information] Trigger Details: MessageId: a70782bf3ef445fba67ad1f01f6201ed, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:28 AM, LockedUntilUtc: 5/19/2020 9:05:58 AM, SessionId: (null)
2020-05-19T09:05:28.066 [Information] C# ServiceBus queue trigger function processed message: Message 5
2020-05-19T09:05:28.067 [Information] Executed 'Function1' (Succeeded, Id=d5092cb3-97ab-4cf2-9506-6a0bac65c9fb)
2020-05-19T09:05:28.314 [Information] Executing 'Function1' (Reason='', Id=932402b4-fa57-4821-956f-c5d42c7ebfdf)
2020-05-19T09:05:28.315 [Information] Trigger Details: MessageId: d16fdc15422e424aaf89530ee6ecdfa1, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:28 AM, LockedUntilUtc: 5/19/2020 9:05:58 AM, SessionId: (null)
2020-05-19T09:05:28.315 [Information] C# ServiceBus queue trigger function processed message: Message 6
2020-05-19T09:05:28.316 [Information] Executed 'Function1' (Succeeded, Id=932402b4-fa57-4821-956f-c5d42c7ebfdf)
2020-05-19T09:05:28.601 [Information] Executing 'Function1' (Reason='', Id=ccaa6cde-332b-4b16-90bc-3c815c35cd27)
2020-05-19T09:05:28.601 [Information] Trigger Details: MessageId: 565932ae66ab4825a9afd4593e97acfe, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:28 AM, LockedUntilUtc: 5/19/2020 9:05:58 AM, SessionId: (null)
2020-05-19T09:05:28.602 [Information] C# ServiceBus queue trigger function processed message: Message 7
2020-05-19T09:05:28.602 [Information] Executed 'Function1' (Succeeded, Id=ccaa6cde-332b-4b16-90bc-3c815c35cd27)
2020-05-19T09:05:28.884 [Information] Executing 'Function1' (Reason='', Id=42cc150a-c267-46a2-bb4b-ac0643d7a20b)
2020-05-19T09:05:28.885 [Information] Trigger Details: MessageId: a2f92944fb604a7bac0e60aec05b7025, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:28 AM, LockedUntilUtc: 5/19/2020 9:05:58 AM, SessionId: (null)
2020-05-19T09:05:28.925 [Information] C# ServiceBus queue trigger function processed message: Message 8
2020-05-19T09:05:28.925 [Information] Executed 'Function1' (Succeeded, Id=42cc150a-c267-46a2-bb4b-ac0643d7a20b)
2020-05-19T09:05:29.165 [Information] Executing 'Function1' (Reason='', Id=40567a13-de42-4663-819f-4ff9dd8104f7)
2020-05-19T09:05:29.166 [Information] Trigger Details: MessageId: 5e8dd007403341d4b8ff3d5141b0fe78, DeliveryCount: 1, EnqueuedTimeUtc: 5/19/2020 9:05:29 AM, LockedUntilUtc: 5/19/2020 9:05:59 AM, SessionId: (null)
2020-05-19T09:05:29.166 [Information] C# ServiceBus queue trigger function processed message: Message 9
2020-05-19T09:05:29.166 [Information] Executed 'Function1' (Succeeded, Id=40567a13-de42-4663-819f-4ff9dd8104f7)

Original Answer:

This should be a bug with azure function UI. I also face this problem:

enter image description here

But in fact the input binding has been loaded. I can get the input successfully:

enter image description here

Please note that if you use C # library development, then your function binding is not defined in function.json. There will be a reference to the compiled dll of your function main file in the function.json file, and the binding direction and definition is in this compiled dll file.(It determines the binding direction according to your code format) Azure function UI on portal will read the binding information from this file and display it on the interface.

I think your function binding should have been loaded. This problem is related to the UI. The azure function has just started to change the UI test version in the past two weeks. Although the new UI is now used for most accounts, it seems there are still some small bugs.