Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon Connect voice live stream #171

Open
zhangyuezhong opened this issue Feb 24, 2023 · 0 comments
Open

Amazon Connect voice live stream #171

zhangyuezhong opened this issue Feb 24, 2023 · 0 comments
Labels

Comments

@zhangyuezhong
Copy link

zhangyuezhong commented Feb 24, 2023

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant