33 lines
1.5 KiB
Diff
33 lines
1.5 KiB
Diff
|
diff --git a/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java b/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
|
||
|
index bd05995..0d12f57 100644
|
||
|
--- a/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
|
||
|
+++ b/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
|
||
|
@@ -66,26 +66,7 @@ public class DirectoryQueue {
|
||
|
}
|
||
|
|
||
|
private void sendMessage(String action, String user) {
|
||
|
- final Map<String, MessageAttributeValue> messageAttributes = new HashMap<>();
|
||
|
- messageAttributes.put("id", new MessageAttributeValue().withDataType("String").withStringValue(user));
|
||
|
- messageAttributes.put("action", new MessageAttributeValue().withDataType("String").withStringValue(action));
|
||
|
- SendMessageRequest sendMessageRequest = new SendMessageRequest()
|
||
|
- .withQueueUrl(queueUrl)
|
||
|
- .withMessageBody("-")
|
||
|
- .withMessageDeduplicationId(user + action)
|
||
|
- .withMessageGroupId(user)
|
||
|
- .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: " + user + " " + action);
|
||
|
}
|
||
|
|
||
|
}
|