Regarding Topic Publish 1 file that will send to all subscriptions

0

I need to Publish 1 file in Topic messaging service , that will be send to all subscriptions. Can you suggest what AWS service help me achieve this usecase? Approx file size 1MB to 5MB. I am not interest to use S3 then move to AWS Messaging service. Can you provide solution for cost efficient and good performance way also?

  • Can you share more about the use case? Which kind of subscribers are you dealing with? server side applications/microservices, devices, user applications/mobile?

  • we have Java Webapplication in AWS through that UI we will upload file to SNS topic, another http subscription rest API java code we will read SNS topic uploaded file. I need reference java code for Publish SNS file through Java code and Read the SNS published file.

1개 답변
0
수락된 답변

We do not have any native service that can do that. The services that you can use as a topic are EventBridge and SNS, and both of them have a payload size limit of 256KB. What customers usually do is save the object to S3 and send on the topic the details of the object so they can retrieve it themselves.

You can also use MSK (Managed Streaming for Kafka) which allows payload size of up to 8 MB.

profile pictureAWS
전문가
Uri
답변함 2년 전
profile picture
전문가
검토됨 20일 전
  • Can you share me reference link how to publish file in SNS and EventBridge through java code?

  • Sorry, but I do not have any such code, but the code should very loosely look something like:

    bucket_name = "bucket";
    object_name = "my_object";
    s3.upload_file(bucket_name, object_name, local_file);
    
    message = { "bucket_name": bucket_name, "object_name": object_name };
    sns.public_message(topic_name, message);
    

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠