Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.

Available since Camel 2.17.0

 

 

The IronMQ component provides integration with IronMQ a elastic and durable hosted message queue as a service.

The component uses the IronMQ java client library.

To run it requires a IronMQ account, and a project id and token.

 

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-ironmq</artifactId>
    <!-- use the same version as your Camel core version -->
    <version>x.y.z</version>
</dependency>

URI format

ironmq:queueName[?options]

Where queueName identifies the IronMQ queue you want to publish or consume messages from.

Options

NameGroupDefaultTypeDescription
clientcommonnullio.iron.ironmq.ClientReference to a io.iron.ironmq.Client in the Registry.
ironMQCloudcommon

https://mq-aws-us-east-1-1.iron.io

String

IronMq Cloud url. Urls for public clusters: https://mq-aws-us-east-1-1.iron.io (US), https://mq-aws-eu-west-1-1.iron.io (EU)

preserveHeaderscommonfalseboolean

Should message headers be preserved when publishing messages.

This will add the Camel headers to the Iron MQ message as a json payload with a header list, and a message body.

Useful when Camel is both consumer and producer.

projectIdcommonnullStringThe IronMQ project Id
tokencommonnullStringThe IronMQ token
batchDeleteconsumerfalsebooleanShould messages be deleted in one batch. This will limit the number of api requests since messages are deleted in one request, instead of one pr. exchange. If enabled care should be taken that the consumer is idempotent when processing exchanges.
concurrentConsumersconsumer1intThe number of concurrent consumers.
maxMessagesPerPollconsumer1intNumber of messages to poll pr. call. Maximum is 100.
timeoutconsumer60intAfter timeout (in seconds), item will be placed back onto the queue.
waitconsumer0intTime in seconds to wait for a message to become available. This enables long polling. Default is 0 (does not wait), maximum is 30.
visibilityDelayproducer0intThe item will not be available on the queue until this many seconds have passed. Default is 0 seconds.

Producer headers

HeaderTypeDescription
CamelIronMQOperationStringIf value set to CamelIronMQClearQueue the queue is cleared of unconsumed messages.
CamelIronMQMessageIdString or io.iron.ironmq.IdsThe id of the IronMQ message as a String when sending a single message, or a Ids object when sending a array of strings. See message body

Consumer headers

HeaderTypeDescription
CamelIronMQMessageIdStringThe id of the message.
CamelIronMQReservationIdStringThe reservation id of the message.
CamelIronMQReservedCountStringThe number of times this message has been reserved.

Message body when producing

Should be either a String or a array of Strings.

In the latter case the batch of strings will be send to IronMQ as one request, creating one message pr. element in the array.

Consumer example

Consume 50 messages pr. poll from the queue 'testqueue' on aws eu, and save the messages to files.

from("ironmq:testqueue?ironMQCloud=https://mq-aws-eu-west-1-1.iron.io&projectId=myIronMQProjectid&token=myIronMQToken&maxMessagesPerPoll=50")
  .to("file:somefolder");

Producer example

Dequeue from activemq jms and enqueue the messages on IronMQ.

from("activemq:foo")
  .to("ironmq:testqueue?projectId=myIronMQProjectid&token=myIronMQToken");
© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram