Dependency on DpsHeaders in PartitionServiceClient class
PartitionServiceClient class in core-lib-azure
depends on DpsHeaders class's object. But the DpsHeaders object, which is actually populated from the http request headers, is not used as it is while creating PartitonServiceClient object. Instead the authorization field value is replaced with other token.
private IPartitionProvider getServiceClient() {
headers.put(DpsHeaders.AUTHORIZATION, "Bearer " + this.tokenService.getAuthorizationToken());
return this.partitionFactory.create(headers);
}
The dependency of DpsHeaders in PatitionServiceClient is causing an issue in notification service, where creating an object of DpsHeaders class is dependent on PartitionServiceClient class. This creates a cyclic deadlock.
Therefore, should PartitionServiceClient have a dependency on DpsHeaders ? If DpsHeaders object is not Autowired in PartitionServiceClient class then it will help in solving the issue observed in notification service.