camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Batch Consumer
Date Thu, 17 Jan 2013 13:17:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/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/Batch+Consumer">Batch
Consumer</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</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" >- [MyBatis] <br>- [SNMP] <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">-
[SQL|SQL Component] <br></td></tr>
            <tr><td class="diff-unchanged" >- [SQS|AWS-SQS] <br>- [S3|AWS-S3]
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="BatchConsumer-BatchConsumer"></a>Batch Consumer</h2>
<p><b>Available as of Camel 2.0</b></p>

<p>Batch Consumer is basically a <a href="/confluence/display/CAMEL/Polling+Consumer"
title="Polling Consumer">Polling Consumer</a> that is capable of polling multiple
<a href="/confluence/display/CAMEL/Exchange" title="Exchange">Exchange</a>s in
a pool. What we have done in Camel 2.0 is to standardize this into a <tt>org.apache.camel.BatchConsumer</tt>
interface that a consumer can implement to indicate it support batching as well.</p>

<p>The following components supports <a href="/confluence/display/CAMEL/Batch+Consumer"
title="Batch Consumer">Batch Consumer</a> by its consumer:</p>
<ul class="alternate" type="square">
	<li><a href="/confluence/display/CAMEL/Atom" title="Atom">Atom</a></li>
	<li><a href="/confluence/display/CAMEL/File2" title="File2">File</a></li>
	<li><a href="/confluence/display/CAMEL/FTP2" title="FTP2">FTP</a></li>
	<li><a href="/confluence/display/CAMEL/hbase" title="hbase">hbase</a></li>
	<li><a href="/confluence/display/CAMEL/iBATIS" title="iBATIS">iBATIS</a></li>
	<li><a href="/confluence/display/CAMEL/JPA" title="JPA">JPA</a></li>
	<li><a href="/confluence/display/CAMEL/jclouds" title="jclouds">jclouds</a></li>
	<li><a href="/confluence/display/CAMEL/Mail" title="Mail">Mail</a></li>
	<li><a href="/confluence/display/CAMEL/MyBatis" title="MyBatis">MyBatis</a></li>
	<li><a href="/confluence/display/CAMEL/SNMP" title="SNMP">SNMP</a></li>
	<li><a href="/confluence/display/CAMEL/SQL+Component" title="SQL Component">SQL</a></li>
	<li><a href="/confluence/display/CAMEL/AWS-SQS" title="AWS-SQS">SQS</a></li>
	<li><a href="/confluence/display/CAMEL/AWS-S3" title="AWS-S3">S3</a></li>
</ul>


<h3><a name="BatchConsumer-ConsumerOptions"></a>Consumer Options</h3>
<p>The Batch Consumer supports the following options:</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Option </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> maxMessagesPerPoll </td>
<td class='confluenceTd'> An integer to define a maximum messages to gather per poll.
By default no maximum is set. Can be used to set a limit of e.g. 1000 to avoid when starting
up the server that there are thousands of files. Set a value of 0 or negative to disabled
it. </td>
</tr>
</tbody></table>
</div>


<h3><a name="BatchConsumer-ExchangeProperties"></a>Exchange Properties</h3>
<p>The following properties is set on the <a href="/confluence/display/CAMEL/Exchange"
title="Exchange">Exchange</a> for each <a href="/confluence/display/CAMEL/Exchange"
title="Exchange">Exchange</a> polled in the same batch.</p>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Property </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> CamelBatchSize </td>
<td class='confluenceTd'> The total number of <a href="/confluence/display/CAMEL/Exchange"
title="Exchange">Exchange</a>s that was polled in this batch. </td>
</tr>
<tr>
<td class='confluenceTd'> CamelBatchIndex </td>
<td class='confluenceTd'> The current index of the batch. Starts from 0. </td>
</tr>
<tr>
<td class='confluenceTd'> CamelBatchComplete </td>
<td class='confluenceTd'> A boolean indicating the last <a href="/confluence/display/CAMEL/Exchange"
title="Exchange">Exchange</a> in the batch. Is only <tt>true</tt> for
the last entry. </td>
</tr>
</tbody></table>
</div>


<h3><a name="BatchConsumer-SeeAlso"></a>See Also</h3>
<ul class="alternate" type="square">
	<li><a href="/confluence/display/CAMEL/Polling+Consumer" title="Polling Consumer">Polling
Consumer</a></li>
</ul>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Batch+Consumer">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=118474&revisedVersion=14&originalVersion=13">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Batch+Consumer?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message