com.amazonaws.services.sqs.model.ReceiveMessageRequest.setMessageAttributeNames()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中com.amazonaws.services.sqs.model.ReceiveMessageRequest.setMessageAttributeNames方法的一些代码示例,展示了ReceiveMessageRequest.setMessageAttributeNames的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReceiveMessageRequest.setMessageAttributeNames方法的具体详情如下:
包路径:com.amazonaws.services.sqs.model.ReceiveMessageRequest
类名称:ReceiveMessageRequest
方法名:setMessageAttributeNames

ReceiveMessageRequest.setMessageAttributeNames介绍

[英]The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).
  • The name is case-sensitive and must be unique among all attribute names for the message.
  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).
  • The name must not start or end with a period (.), and it should not have periods in succession ( ..).
  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.
[中]消息属性的名称,其中N是索引。
*名称可以包含字母数字字符和下划线(_、连字符(-)和句点(.)。
*名称区分大小写,并且在消息的所有属性名称中必须是唯一的。
*名称不得以AWS保留前缀开头,例如AWS.Amazon.(或任何大小写变体)。
*名称不得以句点(.开头或结尾,且不应连续出现句点(..)。
*名称最长可达256个字符。
使用ReceiveMessage时,可以发送要接收的属性名称列表,也可以通过在请求中指定All.*返回所有属性。您还可以使用以前缀开头的所有消息属性,例如bar.*

代码示例

代码示例来源:origin: aws/aws-sdk-java

setMessageAttributeNames(messageAttributeNames);
return this;

代码示例来源:origin: aws/aws-sdk-java

setMessageAttributeNames(new com.amazonaws.internal.SdkInternalList<String>(messageAttributeNames.length));

代码示例来源:origin: apache/nifi

request.setMessageAttributeNames(Collections.singleton("All"));
request.setMaxNumberOfMessages(context.getProperty(BATCH_SIZE).asInteger());
request.setVisibilityTimeout(context.getProperty(VISIBILITY_TIMEOUT).asTimePeriod(TimeUnit.SECONDS).intValue());

代码示例来源:origin: aws-amplify/aws-sdk-android

setMessageAttributeNames(messageAttributeNames);
return this;

代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs

setMessageAttributeNames(messageAttributeNames);
return this;

代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs

setMessageAttributeNames(messageAttributeNames);
return this;

代码示例来源:origin: Comcast/cmb

ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(absoluteQueueUrl);
receiveMessageRequest.setMaxNumberOfMessages(maxNumberOfMessages);
receiveMessageRequest.setMessageAttributeNames(new ArrayList<String>(Arrays.asList("All")));

代码示例来源:origin: payara/Cloud-Connectors

rmr.setWaitTimeSeconds(spec.getPollInterval()/1000);
rmr.setAttributeNames(Arrays.asList(spec.getAttributeNames().split(",")));
rmr.setMessageAttributeNames(Arrays.asList(spec.getMessageAttributeNames().split(",")));
ReceiveMessageResult rmResult = client.receiveMessage(rmr);
if (!rmResult.getMessages().isEmpty()) {

代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs

setMessageAttributeNames(new com.amazonaws.internal.SdkInternalList<String>(messageAttributeNames.length));

代码示例来源:origin: Comcast/cmb

receiveMessageRequest.setMessageAttributeNames(new ArrayList<String>(Arrays.asList("All")));
ReceiveMessageResult result = sqs.receiveMessage(receiveMessageRequest);
logger.debug("event=receive_message queue_url= " + queueUrl + " user_id=" + userId);

代码示例来源:origin: org.apache.nifi/nifi-aws-processors

request.setMessageAttributeNames(Collections.singleton("All"));
request.setMaxNumberOfMessages(context.getProperty(BATCH_SIZE).asInteger());
request.setVisibilityTimeout(context.getProperty(VISIBILITY_TIMEOUT).asTimePeriod(TimeUnit.SECONDS).intValue());

相关文章

微信公众号

最新文章

更多