camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > msmq
Date Wed, 22 Jul 2009 18:14:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/msmq">msmq</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~janstey">Jonathan
Anstey</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h2><a name="msmq-MSMQComponent"></a>MSMQ Component</h2>

<p>The <b>msmq:</b> component is a transport for working with <a href="http://www.microsoft.com/windowsserver2003/technologies/msmq/default.mspx"
rel="nofollow">Microsoft Message Queuing</a><br/>
This component natively sends and receives direct allocated ByteBuffer instances. This allows
to access the JNI layer without expensive memory copying. <br/>
In fact using ByteBuffer created with the method allocateDirect can be passed to the JNI layer
and the native code is able to directly access the memory.<br/>
It's up to the developer to marshal/unmarshal any other kind of payloads to/from direct allocated
ByteBuffer instances.<br/>
Look at the tests to see some usage examples.</p>

<h3><a name="msmq-URIformat"></a>URI format</h3>

<style type="text/css">
@import url(/confluence/download/resources/confluence.ext.code:code/shStyles.css);
</style>
<!--[if IE]>
<style type="text/css">
    .code textarea, .code input { padding: 0 !important; }
</style>
<![endif]-->
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shCore.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushCSharp.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushPhp.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushJScript.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushVb.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushSql.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushXml.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushShell.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushDelphi.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushPython.js"></script>
<script class="javascript" src="/confluence/download/resources/confluence.ext.code:code/shBrushJava.js"></script>
<div class="code">
<textarea name="newcodemacro" class="java:nocontrols:nogutter" rows="10" readonly="readonly">msmq:msmqQueueName</textarea>
<script class="javascript">
    if(!window.newcodemacro_initialised)
    {
        window.newcodemacro_initialised = true;
        window.oldonloadmethod = window.onload;
        window.onload = function(){
            dp.SyntaxHighlighter.HighlightAll('newcodemacro');
            if(window.oldonloadmethod)
            {
                window.oldonloadmethod();
            }
        }
    }

</script>
</div>


<h3><a name="msmq-Examples"></a>Examples</h3>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>msmq:DIRECT=OS:localhost\\private$\\test?concurrentConsumers=1
msmq:DIRECT=OS:localhost\\private$\\test?deliveryPersistent=true&amp;priority=5&amp;timeToLive=10
</pre>
</div></div>

<h3><a name="msmq-Options"></a>Options</h3>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Default Value </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> deliveryPersistent  </td>
<td class='confluenceTd'> false    </td>
<td class='confluenceTd'> if true the message is put persistently on the queue </td>
</tr>
<tr>
<td class='confluenceTd'> priority            </td>
<td class='confluenceTd'> 5        </td>
<td class='confluenceTd'> the message priority, it's a value in the range 1-7  </td>
</tr>
<tr>
<td class='confluenceTd'> timeToLive          </td>
<td class='confluenceTd'> INFINITE </td>
<td class='confluenceTd'> the time in seconds before a message is discarded if it doesn't
reach the destination </td>
</tr>
<tr>
<td class='confluenceTd'> concurrentConsumers </td>
<td class='confluenceTd'> 1        </td>
<td class='confluenceTd'> the numbers of consumers that get messages from the queue
at the same time </td>
</tr>
<tr>
<td class='confluenceTd'> initialBufferSize   </td>
<td class='confluenceTd'> 128      </td>
<td class='confluenceTd'> the initial buffer size </td>
</tr>
<tr>
<td class='confluenceTd'> incrementBufferSize </td>
<td class='confluenceTd'> 128      </td>
<td class='confluenceTd'> if the initial buffer size is not enough big for containing
the received message it's incremented by incrementBufferSize </td>
</tr>
</tbody></table>


<h3><a name="msmq-Usingcamelmsmq"></a>Using camel-msmq</h3>

<p>To use this module you need to use the <a href="http://open.iona.com/products/fuse-mediation-router/"
rel="nofollow">FUSE Mediation Router</a> distribution. Or you could just add the
following to your pom.xml, substituting the version number for the latest &amp; greatest
release.</p>

<div class="code">
<textarea name="newcodemacro" class="java:nocontrols:nogutter" rows="10" readonly="readonly">&lt;dependency&gt;
  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
  &lt;artifactId&gt;camel-msmq&lt;/artifactId&gt;
  &lt;version&gt;1.6.1.1-fuse&lt;/version&gt;
&lt;/dependency&gt;</textarea>
<script class="javascript">
    if(!window.newcodemacro_initialised)
    {
        window.newcodemacro_initialised = true;
        window.oldonloadmethod = window.onload;
        window.onload = function(){
            dp.SyntaxHighlighter.HighlightAll('newcodemacro');
            if(window.oldonloadmethod)
            {
                window.oldonloadmethod();
            }
        }
    }

</script>
</div>


<p>And ensure you are pointing at the maven repo</p>

<div class="code">
<textarea name="newcodemacro" class="java:nocontrols:nogutter" rows="10" readonly="readonly">&lt;repository&gt;
     &lt;id&gt;open.iona.m2&lt;/id&gt;
     &lt;name&gt;IONA Open Source Community Release Repository&lt;/name&gt;
     &lt;url&gt;http://repo.open.iona.com/maven2&lt;/url&gt;
     &lt;snapshots&gt;
       &lt;enabled&gt;false&lt;/enabled&gt;
     &lt;/snapshots&gt;
     &lt;releases&gt;
       &lt;enabled&gt;true&lt;/enabled&gt;
     &lt;/releases&gt;
   &lt;/repository&gt;</textarea>
<script class="javascript">
    if(!window.newcodemacro_initialised)
    {
        window.newcodemacro_initialised = true;
        window.oldonloadmethod = window.onload;
        window.onload = function(){
            dp.SyntaxHighlighter.HighlightAll('newcodemacro');
            if(window.oldonloadmethod)
            {
                window.oldonloadmethod();
            }
        }
    }

</script>
</div>


<h3><a name="msmq-BuildingFromSource"></a>Building From Source</h3>

<p>The source for camel-msmq is available here: <a href="https://projects.open.iona.com/projects/svn/iona/camel/trunk/components/camel-msmq/"
rel="nofollow">https://projects.open.iona.com/projects/svn/iona/camel/trunk/components/camel-msmq/</a></p>

<p>You'll need to register with <a href="http://open.iona.com" rel="nofollow">http://open.iona.com</a>
to be able to access subversion.</p>

<p>The full FUSE distro is here: <a href="https://projects.open.iona.com/projects/svn/iona/camel/trunk/"
rel="nofollow">https://projects.open.iona.com/projects/svn/iona/camel/trunk/</a></p>
<h3><a name="msmq-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>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAMEL/msmq">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=81557&revisedVersion=11&originalVersion=10">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/msmq?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message