= IronMQ Component
:doctitle: IronMQ
:shortname: ironmq
:artifactid: camel-ironmq
:description: Send and receive messages to/from IronMQ an elastic and durable hosted message queue as a service.
:since: 2.17
:supportlevel: Stable
:component-header: Both producer and consumer are supported
//Manually maintained attributes
:camel-spring-boot-name: ironmq

*Since Camel {since}*

*{component-header}*

The IronMQ component provides integration with http://www.iron.io/products/mq[IronMQ] an elastic and durable hosted message queue as a service.

The component uses the
https://github.com/iron-io/iron_mq_java[IronMQ java client]
library.

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

Maven users will need to add the following dependency to their `pom.xml`
for this component:

[source,xml]
------------------------------------------------------------
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-ironmq</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
------------------------------------------------------------

== URI format

-----------------------------
 ironmq:queueName[?options]
-----------------------------
Where **queueName** identifies the IronMQ queue you want to publish or consume messages from.


// component-configure options: START

// component-configure options: END

// component options: START
include::partial$component-configure-options.adoc[]
include::partial$component-endpoint-options.adoc[]
// component options: END

// endpoint options: START

// endpoint options: END
// component headers: START
include::partial$component-endpoint-headers.adoc[]
// component headers: END

== Message Body

Should be either a String or a array of Strings. In the latter case the batch of strings will be sent 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.

[source,java]
--------------------------------------------------
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.

[source,java]
--------------------------------------------------
from("activemq:foo")
  .to("ironmq:testqueue?projectId=myIronMQProjectid&token=myIronMQToken");
--------------------------------------------------


include::spring-boot:partial$starter.adoc[]
