我想在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中找到文档。