You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Andrew Gaul (JIRA)" <ji...@apache.org> on 2015/11/10 23:16:10 UTC
[jira] [Commented] (JCLOUDS-1034) AWS SQS - MessageAttributes not
currently supported
[ https://issues.apache.org/jira/browse/JCLOUDS-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999444#comment-14999444 ]
Andrew Gaul commented on JCLOUDS-1034:
--------------------------------------
Odd, {{org.jclouds.sqs.features.MessageApi.receive}} returns {{org.jclouds.sqs.domain.Message}} which has attributes but {{send}} only takes a String and not a {{Mesage}}. [~MMirabito] this seems relatively straightforward to fix, would you like to try adding support for this?
> AWS SQS - MessageAttributes not currently supported
> ---------------------------------------------------
>
> Key: JCLOUDS-1034
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1034
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-labs-aws
> Affects Versions: 1.9.1
> Reporter: Massimo Mirabito
> Priority: Blocker
>
> After a jclouds forum inquiry it appears that "MessageAttributes" are not currently supported in the jclouds SQS implementation.
> For example when using the AWS API I can include message attributes when I send a message like below. However. I cannot find an equivalent API in jclouds.
> {code}
> AWSCredentials credentials = Aws.getAwsCredentials(accessKey, secretKey);
> AmazonSQSClient sqs = new AmazonSQSClient(credentials);
> sqs.setRegion(Region.getRegion(Regions.US_EAST_1));
> SendMessageRequest smr = new SendMessageRequest();
> smr.withQueueUrl(url);
> smr.setMessageBody(messageBody);
> for (Map.Entry<String, String> entry : map.entrySet()) {
> System.out.println(entry.getKey() + " :: " + entry.getValue());
> MessageAttributeValue mav = new MessageAttributeValue();
> mav.setStringValue(entry.getValue());
> mav.setDataType("String");
> smr.addMessageAttributesEntry(entry.getKey(), mav);
> }
> SendMessageResult x = sqs.sendMessage(smr);
> System.out.println("SQS message published..." + x.getMessageId());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)