c# - How do I have an Async function that writes out to a service bus queue? -
Using the Ezur Webbash SDK, I want to create an async function that will receive the servicebus queue input and a servicebase queue output . Async methods can not have parameters, which are used for the examples of blobstorezes, instead of streams and text writers. However, when I try to do this with the servicebase parameter, I get an exception. String Input, [ServiceBus ("% OutputQueue%")] TextWriter Output, TextWriter Log)
Error indexing method 'FilterCurrentCpesToNewCpes'
The service can not force to type' system. IO.TextWriter '
I get the same message for the stream.
Async functions can not contain parameters, so you send a message to ICollector & Lt; T & gt;
or IAsyncCollector & lt; T & gt;
and add () operations. ICollector WebJobs is defined in SDK.
The following sample shows this. String Input, [ServiceBus ("% Output Queue%")] IAsyncCollector & lt; String & gt; Output, Static Input, [ServiceBusTrigger ("% InputQueue%")] Textured log) wait for {output.AddAsync (input); }
Comments
Post a Comment