| Namespace | http://www.mulesoft.org/schema/mule/redis |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/redis/3.2/mule-redis.xsd |
| Version | 3.2 |
| Minimum Mule Version | 3.2 |
Redis is an open-source, networked, in-memory, persistent, journaled, key-value data store. Provides Redis connectivity to Mule:
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Add the message payload to the set stored at the specified key.
| |||||||||||
Add the message payload with the desired score to the sorted set stored at the specified key.
| |||||||||||
Get the value of the specified key.
| |||||||||||
Get the value stored at the specified field in the hash at the specified key.
| |||||||||||
Retrieve a range of values from the sorted set stored at the specified key.
| |||||||||||
Retrieve a range of values from the sorted set stored at the specified key.
| |||||||||||
Pop a value from the desired side of the list stored at the specified key.
| |||||||||||
Pops a random value from the set stored at the specified key.
| |||||||||||
Publish the message payload to the specified channel.
| |||||||||||
Push the message payload to the desired side (LEFT or RIGHT) of the list stored at the specified key.
| |||||||||||
Reads a random value from the set stored at the specified key.
| |||||||||||
Set key to hold the payload.
| |||||||||||
Set the specified hash field to the message payload.
| |||||||||||
| Message Sources | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Subscribe to the specified channels.
| |||||||||||
To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:redis="http://www.mulesoft.org/schema/mule/redis"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/redis
http://www.mulesoft.org/schema/mule/redis/3.2/mule-redis.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.
| Attributes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Name | Default Value | Description | Optional. Give a name to this configuration so it can be later referenced. | |||||||
| 2000 | Optional. Connection timeout in milliseconds | ||||||||||
| localhost | Optional. Redis host | ||||||||||
| Optional. Redis password | |||||||||||
| Optional. Object pool configuration | |||||||||||
| 6379 | Optional. Redis port | ||||||||||
| 5000 | Optional. Reconnection frequency in milliseconds | ||||||||||
Add the message payload to the set stored at the specified key. If key does not exist, a new key holding a set is created.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for SADD |
||
| Optional. If true, ensures that adding to the set was successful (ie no pre-existing identical value in
the set) |
||
| The payload of the message as a byte array |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Add the message payload with the desired score to the sorted set stored at the specified key. If key does not exist, a new key holding a sorted set is created.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for ZADD |
||
| Score to use for the value |
||
| Optional. If true, ensures that adding to the sorted set was successful (ie no pre-existing identical
value in the set) |
||
| The payload of the message as a byte array |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Get the value of the specified key. If the key does not exist null is returned. If the value stored at key is not a string an error is returned because GET can only handle string values.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for GET |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Get the value stored at the specified field in the hash at the specified key. If the field or the hash don't exist, null is returned.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for HGET |
||
| Field that will be used for HGET |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Retrieve a range of values from the sorted set stored at the specified key. The range of values is defined by indices in the sorted set and sorted as desired.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for ZRANGE/ZREVRANGE |
||
| Range start index |
||
| Range end index |
||
| Optional. Index order for sorting the range, either ASCENDING or DESCENDING |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Retrieve a range of values from the sorted set stored at the specified key. The range of values is defined by scores in the sorted set and sorted as desired.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for ZRANGEBYSCORE/ZREVRANGEBYSCORE |
||
| Range start score |
||
| Range end score |
||
| Optional. Score order for sorting the range, either ASCENDING or DESCENDING |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Pop a value from the desired side of the list stored at the specified key.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for LPOP/RPOP |
||
| The side where to pop the value from, either LEFT or RIGHT |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Pops a random value from the set stored at the specified key.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for SPOP |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Publish the message payload to the specified channel.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Destination of the published message |
||
| Optional. Enforces the fact that the message must have been delivered to at least one consumer |
||
| The payload of the message as a byte array |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Push the message payload to the desired side (LEFT or RIGHT) of the list stored at the specified key. If key does not exist, a new key holding a list is created as long as ifExists is not true.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for LPUSH/RPUSH/LPUSHX/RPUSH |
||
| The side where to push the payload, either LEFT or RIGHT |
||
| Optional. If true execute LPUSHX/RPUSH otherwise LPUSH/RPUSH |
||
| The payload of the message as a byte array |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Reads a random value from the set stored at the specified key.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for SRANDMEMBER |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Set key to hold the payload. If key already holds a value, it is overwritten, regardless of its type as long as ifNotExists is false.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key used to store payload |
||
| Optional. Set a timeout on the specified key. After the timeout the key will be automatically deleted by the
server. A key with an associated timeout is said to be volatile in Redis terminology. |
||
| Optional. If true, then execute SETNX on the Redis server, otherwise execute SET |
||
| The payload of the message as a byte array |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Set the specified hash field to the message payload. If key does not exist, a new key holding a hash is created as long as ifNotExists is true.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| Key that will be used for HSET |
||
| Field that will be used for HSET |
||
| Optional. If true execute HSETNX otherwise HSET |
||
| The payload of the message as a byte array |
||
| 1 | Optional. Specify how many times this operation can be retried automatically |
Subscribe to the specified channels.
INCLUDE_ERROR
| Optional. Specify which configuration to use. | ||
| A list of channel names or globbing patterns. |
||
| Called when messages arrive in any of the specified channels.
|
||
| 1 | Optional. Specify how many times this operation can be retried automatically |