/** * <p> * The body of the message. * </p> * * @param messageBody * The body of the message. * @return Returns a reference to this object so that method calls can be chained together. */ public SendMessageBatchRequestEntry withMessageBody(String messageBody) { setMessageBody(messageBody); return this; }
/** * Constructs a new SendMessageBatchRequestEntry object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param id * An identifier for a message in this batch used to communicate the result.</p> <note> * <p> * The <code>Id</code>s of a batch request need to be unique within a request * </p> * <p> * This identifier can have up to 80 characters. The following characters are accepted: alphanumeric * characters, hyphens(-), and underscores (_). * </p> * @param messageBody * The body of the message. */ public SendMessageBatchRequestEntry(String id, String messageBody) { setId(id); setMessageBody(messageBody); }
session.exportTo(flowFile, baos); final String flowFileContent = baos.toString(); entry.setMessageBody(flowFileContent);
sendMessageBatchRequestEntry.setMessageBody(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * Constructs a new SendMessageBatchRequestEntry object. Callers should use * the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param id <p> * An identifier for the message in this batch. This is used to * communicate the result. Note that the <code>Id</code>s of a * batch request need to be unique within the request. * </p> * @param messageBody <p> * Body of the message. * </p> */ public SendMessageBatchRequestEntry(String id, String messageBody) { setId(id); setMessageBody(messageBody); }
/** * <p> * The body of the message. * </p> * * @param messageBody * The body of the message. * @return Returns a reference to this object so that method calls can be chained together. */ public SendMessageBatchRequestEntry withMessageBody(String messageBody) { setMessageBody(messageBody); return this; }
sendMessageBatchRequestEntry.setMessageBody(StringStaxUnmarshaller .getInstance().unmarshall(context)); continue;
/** * Constructs a new SendMessageBatchRequestEntry object. Callers should use * the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param id <p> * An identifier for the message in this batch. This is used to * communicate the result. Note that the <code>Id</code>s of a * batch request need to be unique within the request. * </p> * @param messageBody <p> * Body of the message. * </p> */ public SendMessageBatchRequestEntry(String id, String messageBody) { setId(id); setMessageBody(messageBody); }
/** * Constructs a new SendMessageBatchRequestEntry object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param id * An identifier for a message in this batch used to communicate the result.</p> <note> * <p> * The <code>Id</code>s of a batch request need to be unique within a request * </p> * <p> * This identifier can have up to 80 characters. The following characters are accepted: alphanumeric * characters, hyphens(-), and underscores (_). * </p> * @param messageBody * The body of the message. */ public SendMessageBatchRequestEntry(String id, String messageBody) { setId(id); setMessageBody(messageBody); }
private SendMessageBatchRequestEntry storeMessageInS3(SendMessageBatchRequestEntry batchEntry) { checkMessageAttributes(batchEntry.getMessageAttributes()); String s3Key = UUID.randomUUID().toString(); // Read the content of the message from message body String messageContentStr = batchEntry.getMessageBody(); Long messageContentSize = getStringSizeInBytes(messageContentStr); // Add a new message attribute as a flag MessageAttributeValue messageAttributeValue = new MessageAttributeValue(); messageAttributeValue.setDataType("Number"); messageAttributeValue.setStringValue(messageContentSize.toString()); batchEntry.addMessageAttributesEntry(SQSExtendedClientConstants.RESERVED_ATTRIBUTE_NAME, messageAttributeValue); // Store the message content in S3. storeTextInS3(s3Key, messageContentStr, messageContentSize); LOG.info("S3 object created, Bucket name: " + clientConfiguration.getS3BucketName() + ", Object key: " + s3Key + "."); // Convert S3 pointer (bucket name, key, etc) to JSON string MessageS3Pointer s3Pointer = new MessageS3Pointer(clientConfiguration.getS3BucketName(), s3Key); String s3PointerStr = getJSONFromS3Pointer(s3Pointer); // Storing S3 pointer in the message body. batchEntry.setMessageBody(s3PointerStr); return batchEntry; }
session.exportTo(flowFile, baos); final String flowFileContent = baos.toString(); entry.setMessageBody(flowFileContent);
sendMessageBatchRequestEntry.setMessageBody(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
sendMessageBatchRequestEntry.setMessageBody(StringStaxUnmarshaller .getInstance().unmarshall(context)); continue;