简体   繁体   中英

Use LearningTransport with nservicebus azure trigger functions (NServiceBusTriggerFunction)

Trying to use the example code snippet:

builder.UseNServiceBus(ctx =>
{
    var endpointConfig = new EndpointConfiguration("ConsoleEndpoint");
    endpointConfig.UseTransport(new LearningTransport());

    return endpointConfig;
});

It's not working, also tried similar stuff to no avail.

When I run the azure function locally in the functions "emulator", it would be fine for me to use the local file system for the messages (LearningTransport), however the config.UseTransport doesn't accept an Instance of LearningTransport.

What would be the correct way to use the LearningTransport with the azure functions trigger?

NServiceBus support for functions only works with Service Bus and Storage Queues . If you want to run locally, the latter should be working with Azurite.

Worth noting that NServiceBus support for functions is based on the triggers functions provide, not the transports NServiceBus has. Therefore LearningTransport would not be supported as it's not a valid function trigger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM