我想在Java中订阅时启用原始消息传递

我可以设置什么参数?

AmazonSNSClient amazonSNSClient = (AmazonSNSClient) AmazonSNSClientBuilder.standard()
            .withRegion(Regions.US_WEST_2).build();
    SubscribeRequest subscribeRequest = new SubscribeRequest();
    SubscribeResult subscribeResult = new SubscribeResult();
    subscribeRequest.setTopicArn(createTopicResult.getTopicArn());
    subscribeRequest.setProtocol(protocol);
    subscribeRequest.setEndpoint(endpoint);
    subscribeResult = amazonSNSClient.subscribe(subscribeRequest);

最佳答案

使用withAttribute并传入RawMessageDelivery。可以在here中找到文档。

07-24 22:14