Amazon Connect voice live stream
zhangyuezhong opened this issue · 0 comments
I'm building a solution to download the Amazon Connect voice live stream, each call will have different streamARN and startFragment number.
AmazonKinesisVideo amazonKinesisVideo = (AmazonKinesisVideo) AmazonKinesisVideoClientBuilder.standard(). build();
String endpoint = amazonKinesisVideo.getDataEndpoint(new GetDataEndpointRequest().withAPIName(APIName.GET_MEDIA).withStreamName(streamName)).getDataEndpoint();
AmazonKinesisVideoMediaClientBuilder amazonKinesisVideoMediaClientBuilder = AmazonKinesisVideoMediaClientBuilder
.standard()
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endPoint, region.getName()))
.withCredentials(awsCredentialsProvider);
AmazonKinesisVideoMedia amazonKinesisVideoMedia = amazonKinesisVideoMediaClientBuilder.build();
there will be 3400 calls over the day, I need to loop over and download them.
The question is how can i reuse amazonKinesisVideoMedia object (it is AmazonWebServiceClient), the endpoint could be different for each stream. (should i use Map to track the endpoint and client?)
it seems AmazonKinesisVideo and AmazonKinesisVideoMedia have separate HTTP Client and connection pool, they are not sharing the connection pool.
i can have single instance of AmazonKinesisVideo for my application and shutdown it before exit.
However, i have to create 3400 instance of AmazonKinesisVideoMedia ,
also are AmazonKinesisVideo and AmazonKinesisVideoMedia threadsafe ?