infrastructure/signal-server-patches/remove-sqs.patch
2020-06-16 21:37:37 -07:00

33 lines
1.7 KiB
Diff

diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java b/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
index af8b89a..c4cad9d 100644
--- a/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
+++ b/service/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
@@ -67,27 +67,7 @@ public class DirectoryQueue {
}
private void sendMessage(String action, UUID uuid, String number) {
- final Map<String, MessageAttributeValue> messageAttributes = new HashMap<>();
- messageAttributes.put("id", new MessageAttributeValue().withDataType("String").withStringValue(number));
- messageAttributes.put("uuid", new MessageAttributeValue().withDataType("String").withStringValue(uuid.toString()));
- messageAttributes.put("action", new MessageAttributeValue().withDataType("String").withStringValue(action));
- SendMessageRequest sendMessageRequest = new SendMessageRequest()
- .withQueueUrl(queueUrl)
- .withMessageBody("-")
- .withMessageDeduplicationId(UUID.randomUUID().toString())
- .withMessageGroupId(number)
- .withMessageAttributes(messageAttributes);
- try {
- sqs.sendMessage(sendMessageRequest);
- } catch (AmazonServiceException ex) {
- serviceErrorMeter.mark();
- logger.warn("sqs service error: ", ex);
- } catch (AmazonClientException ex) {
- clientErrorMeter.mark();
- logger.warn("sqs client error: ", ex);
- } catch (Throwable t) {
- logger.warn("sqs unexpected error: ", t);
- }
+ logger.info("Pretending to send SQS message: " + action);
}
}