Skip to content

[FEATURE REQ] Allow configuration of Reactive Scheduler on SDK or Client level #48827

@bca111

Description

@bca111

Is your feature request related to a problem? Please describe.

My application has a dedicated thread pool for IO operations that I want to use for azure-sdk async clients (namely eventhubs and blob storage ones) as a Scheduler instead of Schedulers.boundedElastic() but I couldn't find any way to set it across the sdk, or client specific. EventHubClientBuilder has a EventHubClientBuilder scheduler(Scheduler scheduler) method but it's not public. BlobServiceClientBuilder doesn't have such method.

Describe the solution you'd like
Some way to configure Scheduler for all SDK or client basis. Such as

EventHubClientBuilder()
           .connectionString(...)
           .scheduler(customScheduler) // method exist but package private
           .buildAsyncProducerClient()

BlobServiceClientBuilder()
           .scheduler(customScheduler) // method doesn't exist
           .buildAsyncClient()

Describe alternatives you've considered
I'm currently using Mono<T> publishOn(Scheduler scheduler) method but it's kind of error prone. Also I'm not sure that's enough to avoid creation of the Schedulers.boundedElastic() pool for consumer clients. Here's how my code looks now:

eventHubProducerClient.send(data, sendOptions)
               .publishOn(customScheduler)
               .subscribe(...)

Additional context
N/A

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Description Added
  • Expected solution specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions