camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Mueller (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache Camel > AWS-SDB
Date Fri, 23 Aug 2013 09:43:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/en/2176/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/AWS-SDB">AWS-SDB</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~muellerc">Christian
Mueller</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >| {{CamelAwsSdbReplaceableItems}}
| {{Collection&lt;ReplaceableItem&gt;}} | A list of items to put in a Domain. | <br>|
{{CamelAwsSdbSelectExpression}} | {{String}} | The expression used to query the domain. |
<br></td></tr>
            <tr><td class="diff-changed-lines" >| {{CamelAwsSdbUpdateCondition}}
| <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{String}}</span>
<span class="diff-added-words"style="background-color: #dfd;">{{UpdateCondition}}</span>
| The update condition which, if specified, determines whether the specified attributes will
be updated/deleted or not. | <br></td></tr>
            <tr><td class="diff-unchanged" >{div} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="AWS-SDB-SDBComponent"></a>SDB Component</h2>
<p><b>Available as of Camel 2.8.4</b></p>

<p>The sdb component supports storing and retrieving data from/to <a href="http://aws.amazon.com/sdb"
class="external-link" rel="nofollow">Amazon's SDB</a> service.</p>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Prerequisites</b><br
/>You must have a valid Amazon Web Services developer account, and be signed up to use
Amazon SDB. More information are available at <a href="http://aws.amazon.com/sdb" class="external-link"
rel="nofollow">Amazon SDB</a>.</td></tr></table></div>

<h3><a name="AWS-SDB-URIFormat"></a>URI Format</h3>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
aws-sdb://domainName[?options]
</pre>
</div></div>
<p>You can append query options to the URI in the following format, ?options=value&amp;option2=value&amp;...</p>

<h3><a name="AWS-SDB-URIOptions"></a>URI Options</h3>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Default Value </th>
<th class='confluenceTh'> Context </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'>amazonSDBClient </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> Reference to a <tt>com.amazonaws.services.simpledb.AmazonSimpleDB</tt>
in the <a href="/confluence/display/CAMEL/Registry" title="Registry">Registry</a>.
</td>
</tr>
<tr>
<td class='confluenceTd'>accessKey </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> Amazon AWS Access Key </td>
</tr>
<tr>
<td class='confluenceTd'>secretKey </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> Amazon AWS Secret Key </td>
</tr>
<tr>
<td class='confluenceTd'>amazonSdbEndpoint </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> The region with which the AWS-SDB client wants to work with.
</td>
</tr>
<tr>
<td class='confluenceTd'>domainName </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> The name of the domain currently worked with. </td>
</tr>
<tr>
<td class='confluenceTd'>maxNumberOfDomains </td>
<td class='confluenceTd'> <tt>100</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> The maximum number of domain names you want returned. The
range is 1 * to 100. </td>
</tr>
<tr>
<td class='confluenceTd'>consistentRead </td>
<td class='confluenceTd'> <tt>false</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> Determines whether or not strong consistency should be enforced
when data is read.</td>
</tr>
<tr>
<td class='confluenceTd'>operation</td>
<td class='confluenceTd'> <tt>PutAttributes</tt> </td>
<td class='confluenceTd'> Producer </td>
<td class='confluenceTd'> Valid values are BatchDeleteAttributes, BatchPutAttributes,
DeleteAttributes, DeleteDomain, DomainMetadata, GetAttributes, ListDomains, PutAttributes,
Select.</td>
</tr>
</tbody></table>
</div>


<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td><b>Required
SDB component options</b><br />You have to provide the amazonSDBClient in the
<a href="/confluence/display/CAMEL/Registry" title="Registry">Registry</a> or
your accessKey and secretKey to access the <a href="http://aws.amazon.com/sdb" class="external-link"
rel="nofollow">Amazon's SDB</a>.</td></tr></table></div>

<h3><a name="AWS-SDB-Usage"></a>Usage</h3>
<h4><a name="AWS-SDB-MessageheadersevaluatedbytheSDBproducer"></a>Message
headers evaluated by the SDB producer</h4>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Header </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributes</tt> </td>
<td class='confluenceTd'> <tt>Collection&lt;Attribute&gt;</tt> </td>
<td class='confluenceTd'> List of attributes to be acted upon. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributeNames</tt> </td>
<td class='confluenceTd'> <tt>Collection&lt;String&gt;</tt> </td>
<td class='confluenceTd'> The names of the attributes to be retrieved. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbConsistentRead</tt> </td>
<td class='confluenceTd'> <tt>Boolean</tt> </td>
<td class='confluenceTd'> Determines whether or not strong consistency should be enforced
when data is read. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbDeletableItems</tt> </td>
<td class='confluenceTd'> <tt>Collection&lt;DeletableItem&gt;</tt>
</td>
<td class='confluenceTd'> A list of items on which to perform the delete operation in
a batch. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbDomainName</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> The name of the domain currently worked with. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbItemName</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> The unique key for this item </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbMaxNumberOfDomains</tt> </td>
<td class='confluenceTd'> <tt>Integer</tt> </td>
<td class='confluenceTd'> The maximum number of domain names you want returned. The
range is 1 * to 100. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbNextToken</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> A string specifying where to start the next list of domain/item
names. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbOperation</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> To override the operation from the URI options. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbReplaceableAttributes</tt> </td>
<td class='confluenceTd'> <tt>Collection&lt;ReplaceableAttribute&gt;</tt>
</td>
<td class='confluenceTd'> List of attributes to put in an Item. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbReplaceableItems</tt> </td>
<td class='confluenceTd'> <tt>Collection&lt;ReplaceableItem&gt;</tt>
</td>
<td class='confluenceTd'> A list of items to put in a Domain. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbSelectExpression</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> The expression used to query the domain. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbUpdateCondition</tt> </td>
<td class='confluenceTd'> <tt>UpdateCondition</tt> </td>
<td class='confluenceTd'> The update condition which, if specified, determines whether
the specified attributes will be updated/deleted or not. </td>
</tr>
</tbody></table>
</div>
</div>

<h4><a name="AWS-SDB-MessageheaderssetduringDomainMetadataoperation"></a>Message
headers set during DomainMetadata operation</h4>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Header </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbTimestamp</tt> </td>
<td class='confluenceTd'> <tt>Integer</tt> </td>
<td class='confluenceTd'> The data and time when metadata was calculated, in Epoch (UNIX)
seconds. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbItemCount</tt> </td>
<td class='confluenceTd'> <tt>Integer</tt> </td>
<td class='confluenceTd'> The number of all items in the domain. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributeNameCount</tt> </td>
<td class='confluenceTd'> <tt>Integer</tt> </td>
<td class='confluenceTd'> The number of unique attribute names in the domain. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributeValueCount</tt> </td>
<td class='confluenceTd'> <tt>Integer</tt> </td>
<td class='confluenceTd'> The number of all attribute name/value pairs in the domain.
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributeNameSize</tt> </td>
<td class='confluenceTd'> <tt>Long</tt> </td>
<td class='confluenceTd'> The total size of all unique attribute names in the domain,
in bytes. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributeValueSize</tt> </td>
<td class='confluenceTd'> <tt>Long</tt> </td>
<td class='confluenceTd'> The total size of all attribute values in the domain, in bytes.
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbItemNameSize</tt> </td>
<td class='confluenceTd'> <tt>Long</tt> </td>
<td class='confluenceTd'> The total size of all item names in the domain, in bytes.
</td>
</tr>
</tbody></table>
</div>
</div>

<h4><a name="AWS-SDB-MessageheaderssetduringGetAttributesoperation"></a>Message
headers set during GetAttributes operation</h4>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Header </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbAttributes</tt> </td>
<td class='confluenceTd'> <tt>List&lt;Attribute&gt;</tt> </td>
<td class='confluenceTd'> The list of attributes returned by the operation. </td>
</tr>
</tbody></table>
</div>
</div>

<h4><a name="AWS-SDB-MessageheaderssetduringListDomainsoperation"></a>Message
headers set during ListDomains operation</h4>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Header </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbDomainNames</tt> </td>
<td class='confluenceTd'> <tt>List&lt;String&gt;</tt> </td>
<td class='confluenceTd'> A list of domain names that match the expression. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbNextToken</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> An opaque token indicating that there are more domains than
the specified MaxNumberOfDomains still available. </td>
</tr>
</tbody></table>
</div>
</div>

<h4><a name="AWS-SDB-MessageheaderssetduringSelectoperation"></a>Message
headers set during Select operation</h4>
<div class="confluenceTableSmall"><div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Header </th>
<th class='confluenceTh'> Type </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbItems</tt> </td>
<td class='confluenceTd'> <tt>List&lt;Item&gt;</tt> </td>
<td class='confluenceTd'> A list of items that match the select expression. </td>
</tr>
<tr>
<td class='confluenceTd'> <tt>CamelAwsSdbNextToken</tt> </td>
<td class='confluenceTd'> <tt>String</tt> </td>
<td class='confluenceTd'> An opaque token indicating that more items than MaxNumberOfItems
were matched, the response size exceeded 1 megabyte, or the execution time exceeded 5 seconds.
</td>
</tr>
</tbody></table>
</div>
</div>

<h4><a name="AWS-SDB-AdvancedAmazonSimpleDBconfiguration"></a>Advanced AmazonSimpleDB
configuration</h4>
<p>If you need more control over the <tt>AmazonSimpleDB</tt> instance configuration
you can create your own instance and refer to it from the URI:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
from("direct:start")
.to("aws-sdb://domainName?amazonSDBClient=#client");
</pre>
</div></div>
<p>The <tt>#client</tt> refers to a <tt>AmazonSimpleDB</tt>
in the <a href="/confluence/display/CAMEL/Registry" title="Registry">Registry</a>.</p>

<p>For example if your Camel Application is running behind a firewall:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
AWSCredentials awsCredentials = new BasicAWSCredentials("myAccessKey", "mySecretKey");
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setProxyHost("http://myProxyHost");
clientConfiguration.setProxyPort(8080);

AmazonSimpleDB client = new AmazonSimpleDBClient(awsCredentials, clientConfiguration);

registry.bind("client", client);
</pre>
</div></div>

<h3><a name="AWS-SDB-Dependencies"></a>Dependencies</h3>
<p>Maven users will need to add the following dependency to their pom.xml.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>pom.xml</b></div><div class="codeContent
panelContent">
<pre class="theme: Default; brush: xml; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
&lt;dependency&gt;
    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
    &lt;artifactId&gt;camel-aws&lt;/artifactId&gt;
    &lt;version&gt;${camel-version}&lt;/version&gt;
&lt;/dependency&gt;
</pre>
</div></div>

<p>where <tt>${camel-version</tt>} must be replaced by the actual version
of Camel (2.8.4 or higher).</p>

<h3><a name="AWS-SDB-SeeAlso"></a>See Also</h3>
<ul>
	<li><a href="/confluence/display/CAMEL/Configuring+Camel" title="Configuring Camel">Configuring
Camel</a></li>
	<li><a href="/confluence/display/CAMEL/Component" title="Component">Component</a></li>
	<li><a href="/confluence/display/CAMEL/Endpoint" title="Endpoint">Endpoint</a></li>
	<li><a href="/confluence/display/CAMEL/Getting+Started" title="Getting Started">Getting
Started</a></li>
</ul>

<ul class="alternate" type="square">
	<li><a href="/confluence/display/CAMEL/AWS" title="AWS">AWS Component</a></li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=CAMEL">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email notification preferences</a>
</div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/AWS-SDB">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=27834041&revisedVersion=4&originalVersion=3">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/AWS-SDB?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message