LibraryLink ToToggle FramesPrintFeedback

Chapter 38. msmq

The msmq: component is a transport for working with Microsoft Message Queuing This component natively sends and receives direct allocated ByteBuffer instances. This allows to access the JNI layer without expensive memory copying. 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. It's up to the developer to marshal/unmarshal any other kind of payloads to/from direct allocated ByteBuffer instances. Look at the tests to see some usage examples.

msmq:msmqQueueName

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

To use this module you need to use the FUSE Mediation Router distribution. Or you could just add the following to your pom.xml, substituting the version number for the latest & greatest release.

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-parent</artifactId>
  <version>1.3.4.0-fuse</version>
</dependency>

And ensure you are pointing at the maven repo

   <repository>
     <id>open.iona.m2</id>
     <name>IONA Open Source Community Release Repository</name>
     <url>http://repo.open.iona.com/maven2</url>
     <snapshots>
       <enabled>false</enabled>
     </snapshots>
     <releases>
       <enabled>true</enabled>
     </releases>
   </repository>

The source for camel-msmq is available here: https://projects.open.iona.com/projects/svn/iona/camel/trunk/components/camel-msmq/

You'll need to register with http://open.iona.com to be able to access subversion.

The full FUSE distro is here: https://projects.open.iona.com/projects/svn/iona/camel/trunk/