...
The IronMQ component provides integration with IronMQ an a elastic and durable hosted message queue as a service.
...
Name | Group | Default | Type | Description |
---|---|---|---|---|
client | common | null | io.iron.ironmq.Client | Reference to a io.iron.ironmq.Client in the Registry. |
ironMQCloud | common | String | IronMq Cloud url. See httpUrls for public clusters: https:// devmq-aws-us-east-1-1.iron.io (US), https:/ mq/reference/clouds/ for valid options/mq-aws-eu-west-1-1.iron.io (EU) | |
preserveHeaders | common | false | boolean | 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.This is useful Useful when Camel is both consumer and producer. |
projectId | common | null | String | The IronMQ project Id |
token | common | null | String | The IronMQ token |
batchDelete | consumer | false | boolean | Should 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. |
concurrentConsumers | consumer | 1 | Integerint | The number of concurrent consumers. |
maxMessagesPerPoll | consumer | 1 | int | Number of messages to poll pr. call. Maximum is 100. |
timeout | consumer | 60 | int | After timeout (in seconds), item will be placed back onto the queue. |
wait | consumer | 0 | int | Time in seconds to wait for a message to become available. This enables long polling. Default is 0 (does not wait), maximum is 30. |
visibilityDelay | producer | 0 | int | The item will not be available on the queue until this many seconds have passed. Default is 0 seconds. |
Producer headers
Header | Type | Description |
---|---|---|
CamelIronMQOperation | String | If value set to CamelIronMQClearQueue the queue is cleared of unconsumed messages. |
CamelIronMQMessageId | String or io.iron.ironmq.Ids | The 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
Header | Type | Description |
---|---|---|
CamelIronMQMessageId | String | The id of the message. |
CamelIronMQReservationId | String | The reservation id of the message. |
CamelIronMQReservedCount | String | The number of times this message has been reserved. |
Message body when producing
...
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.
Code Block | ||
---|---|---|
| ||
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.
Code Block | ||
---|---|---|
| ||
from("activemq:foo")
.to("ironmq:testqueue?projectId=myIronMQProjectid&token=myIronMQToken"); |