question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support IAsyncCollector in Node output bindings

See original GitHub issue

We currently only allow you to output a single item (e.g. queue message). We need to support an array of items. This will apply to all binding types that support ICollector (Qeueus, ServiceBus, Tables, etc.).

See SO post here: https://stackoverflow.com/questions/36374464/can-i-queue-multiple-items-from-a-single-run-of-an-azure-function

Can’t get ICollector working for C# either. I expected the following to work but it didn’t:

public static HttpResponseMessage Run(HttpRequestMessage req, ICollector<string> messageQueue, TraceWriter log)
{
    log.Verbose($"C# HTTP trigger function processed a request. RequestUri={req.RequestUri}");

    string[] messages = new [] { "Larry", "Moe", "Curly" };
    foreach (var message in messages)
    {
        messageQueue.Add(message);
    }

    return req.CreateResponse(HttpStatusCode.OK);
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
mathewccommented, Apr 5, 2016

Thanks for the eagerness 😃 The plan is @davidebbo will deploy it tomorrow morning. I tested it out and it works great 😃 Here’s an example from our samples, showing how it works.

1reaction
TheBlueSkycommented, Apr 5, 2016

Thanks @mathewc and @davidebbo… and I’m glad to report that my first test shows that it works 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Service Bus output bindings for Azure Functions
Use Azure Service Bus output binding to send queue or topic messages. For information on setup and configuration details, see the overview.
Read more >
How to use an Azure Function Binding to send a scheduled ...
I have an Azure Function written in node.js that is successfully sending a message to an Azure Service Bus Queue using an output...
Read more >
How Bindings in Azure Functions Work
Output bindings are resources that we write the output of our function. To use the, we define an output binding attribute to our...
Read more >
Azure Cosmos DB + Functions Cookbook — output collector
To store the data, I'm going to use a not-so-well documented jewel in the Azure Functions Output bindings called the IAsyncCollector.
Read more >
The new Node.js programming model - YouTube
Get an overview of the new Node.js programming model for Azure ... with extra output 11:58 Durable Functions - client function 13:02 New ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found