Skip to content

AddAzureStorageQueues() vs AddAzureStorageCoreServices() #10768

Open
@franklixuefei

Description

Is your question related to a specific version? If so, please specify:

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

C#

Question

Hi!

Currently my setup is like the below:

builder.ConfigureWebJobs(webjobsBuilder =>
{
    // add azure core services to allow AzureWebJobsStorage and other Storage triggers and bindings to use identity
    **webjobsBuilder.AddAzureStorageCoreServices();**

    // timer trigger ref: https://github.com/Azure/azure-webjobs-sdk-extensions/issues/786#issuecomment-1533904606

    // add timer trigger
    webjobsBuilder.AddTimers();

    // sets up both the distributed lock manager and the schedule monitor to be backed in Azure Storage. Without this, timer won't trigger.
    webjobsBuilder.AddTimersStorage();

    // Uncomment to use service bus queue triggers
    webjobsBuilder.AddServiceBus();

    // add storage queue trigger
    webjobsBuilder.AddAzureStorageQueues();

   **// QUESTION: do we need to add this? why?**
   webjobsBuilder.AddAzureStorageBlobs();

    // add DTFX dependencies
    webjobsBuilder.AddDurableTask(durables =>
    {
        durables.HubName = "MyDtfxHub";
        durables.ExtendedSessionsEnabled = true;
        durables.LocalRpcEndpointEnabled = false;
        durables.UseGracefulShutdown = true;
    });
});

I understand that by webjobsBuilder.AddAzureStorageCoreServices(); we are allowing storage and the storage triggers/bindings to use the proper identity (correct me if I'm wrong). Also, by webjobsBuilder.AddAzureStorageQueues(); we are enabling the storage queue trigger (again, correct me if I'm wrong).
However, my question is - what does adding webjobsBuilder.AddAzureStorageBlobs(); give us? Is this even necessary?

Thanks!

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions