Added camel-spring-redis docs to Gitbook

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/438273db
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/438273db
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/438273db

Branch: refs/heads/master
Commit: 438273dbeccfbbf97d3945cbfd27a6066569966a
Parents: 7474d9d
Author: Andrea Cosentino <anco...@gmail.com>
Authored: Wed Jun 8 13:17:24 2016 +0200
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Wed Jun 8 13:38:00 2016 +0200

----------------------------------------------------------------------
 .../src/main/docs/spring-redis.adoc             | 376 +++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                  |   1 +
 2 files changed, 377 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/438273db/components/camel-spring-redis/src/main/docs/spring-redis.adoc
----------------------------------------------------------------------
diff --git a/components/camel-spring-redis/src/main/docs/spring-redis.adoc 
b/components/camel-spring-redis/src/main/docs/spring-redis.adoc
new file mode 100644
index 0000000..6b2bf1c
--- /dev/null
+++ b/components/camel-spring-redis/src/main/docs/spring-redis.adoc
@@ -0,0 +1,376 @@
+[[SpringRedis-SpringRedisComponent]]
+Spring Redis Component
+~~~~~~~~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.11*
+
+This component allows sending and receiving messages from
+http://http//redis.io/[Redis]. Redis is advanced key-value store where
+keys can contain strings, hashes, lists, sets and sorted sets. In
+addition it provides pub/sub functionality for inter-app
+communications. +
+ Camel provides a producer for executing commands, consumer for
+subscribing to pub/sub messages an idempotent repository for filtering
+out duplicate messages.
+
+INFO:*Prerequisites*
+In order to use this component, you must have a Redis server running.
+
+
+[[SpringRedis-URIFormat]]
+URI Format
+^^^^^^^^^^
+
+[source,java]
+----------------------------------
+spring-redis://host:port[?options]
+----------------------------------
+
+You can append query options to the URI in the following format,
+`?options=value&option2=value&...`
+
+[[SpringRedis-URIOptions]]
+URI Options
+^^^^^^^^^^^
+
+
+// component options: START
+The Spring Redis component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The Spring Redis component supports 12 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| host | common |  | String | *Required* The host where Redis server is 
running.
+| port | common |  | Integer | *Required* Redis server port number
+| channels | common |  | String | List of topic names or name patterns to 
subscribe to. Multiple names can be separated by comma.
+| command | common | SET | Command | Default command which can be overridden 
by message header. Notice the consumer only supports the following commands: 
PSUBSCRIBE and SUBSCRIBE
+| connectionFactory | common |  | RedisConnectionFactory | Reference to a 
pre-configured RedisConnectionFactory instance to use.
+| listenerContainer | common |  | RedisMessageListenerContainer | Reference to 
a pre-configured RedisMessageListenerContainer instance to use.
+| redisTemplate | common |  | RedisTemplate | Reference to a pre-configured 
RedisTemplate instance to use.
+| serializer | common |  | RedisSerializer | Reference to a pre-configured 
RedisSerializer instance to use.
+| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the 
consumer to the Camel routing Error Handler which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages or the likes will now 
be processed as a message and handled by the routing Error Handler. By default 
the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN/ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the 
consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler 
is enabled then this options is not in use. By default the consumer will deal 
with exceptions that will be logged at WARN/ERROR level and ignored.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default 
exchange pattern when creating an exchange
+| synchronous | advanced | false | boolean | Sets whether synchronous 
processing should be strictly used or Camel is allowed to use asynchronous 
processing (if supported).
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[SpringRedis-Usage]]
+Usage
+^^^^^
+
+See also the unit tests available
+at 
https://github.com/apache/camel/tree/master/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis[https://github.com/apache/camel/tree/master/components/camel-spring-redis/src/test/java/org/apache/camel/component/redis].
+
+[[SpringRedis-MessageheadersevaluatedbytheRedisproducer]]
+Message headers evaluated by the Redis producer
++++++++++++++++++++++++++++++++++++++++++++++++
+
+The producer issues commands to the server and each command has
+different set of parameters with specific types. The result from the
+command execution is returned in the message body.
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|Hash Commands |Description |Parameters |Result
+
+|`HSET` |Set the string value of a hash field |CamelRedis.Key (String), 
CamelRedis.Field (String), CamelRedis.Value
+(Object) |void
+
+|`HGET` |Get the value of a hash field |CamelRedis.Key (String), 
CamelRedis.Field (String) |String
+
+|`HSETNX` |Set the value of a hash field, only if the field does not exist 
|CamelRedis.Key (String), CamelRedis.Field (String), CamelRedis.Value
+(Object) |void
+
+|`HMSET` |Set multiple hash fields to multiple values |CamelRedis.Key 
(String), CamelRedis.Values(Map<String, Object>) |void
+
+|`HMGET` |Get the values of all the given hash fields |CamelRedis.Key 
(String), CamelRedis.Fields (Collection<String>) |Collection<Object>
+
+|`HINCRBY` |Increment the integer value of a hash field by the given number 
|CamelRedis.Key (String), CamelRedis.Field (String), CamelRedis.Value
+(Long) |Long
+
+|`HEXISTS` |Determine if a hash field exists |CamelRedis.Key (String), 
CamelRedis.Field (String) |Boolean
+
+|`HDEL` |Delete one or more hash fields |CamelRedis.Key (String), 
CamelRedis.Field (String) |void 
+
+|`HLEN` |Get the number of fields in a hash |CamelRedis.Key (String) |Long
+
+|`HKEYS` |Get all the fields in a hash |CamelRedis.Key (String) |Set<String>
+
+|`HVALS` |Get all the values in a hash |CamelRedis.Key (String) 
|Collection<Object>
+
+|`HGETALL` |Get all the fields and values in a hash |CamelRedis.Key (String) 
|Map<String, Object>
+|=======================================================================
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|List Commands |Description |Parameters |Result
+
+|`RPUSH` |Append one or multiple values to a list |CamelRedis.Key (String), 
CamelRedis.Value (Object) |Long
+
+|`RPUSHX` |Append a value to a list, only if the list exists |CamelRedis.Key 
(String), CamelRedis.Value (Object) |Long
+
+|`LPUSH` |Prepend one or multiple values to a list |CamelRedis.Key (String), 
CamelRedis.Value (Object) |Long
+
+|`LLEN` |Get the length of a list |CamelRedis.Key (String) |Long
+
+|`LRANGE` |Get a range of elements from a list |CamelRedis.Key (String), 
CamelRedis.Start (Long), CamelRedis.End (Long) |List<Object>
+
+|`LTRIM` |Trim a list to the specified range |CamelRedis.Key (String), 
CamelRedis.Start (Long), CamelRedis.End (Long) |void
+
+|`LINDEX` |Get an element from a list by its index |CamelRedis.Key (String), 
CamelRedis.Index (Long) |String
+
+|`LINSERT` |Insert an element before or after another element in a list 
|CamelRedis.Key (String), CamelRedis.Value (Object), CamelRedis.Pivot
+(String), CamelRedis.Position (String) |Long
+
+|`LSET` |Set the value of an element in a list by its index |CamelRedis.Key 
(String), CamelRedis.Value (Object), CamelRedis.Index
+(Long) |void
+
+|`LREM` |Remove elements from a list |CamelRedis.Key (String), 
CamelRedis.Value (Object), CamelRedis.Count
+(Long) |Long
+
+|`LPOP` |Remove and get the first element in a list |CamelRedis.Key (String) 
|Object
+
+|`RPOP` |Remove and get the last element in a list |CamelRedis.Key (String) 
|String
+
+|`RPOPLPUSH` |Remove the last element in a list, append it to another list and 
return
+it |CamelRedis.Key (String), CamelRedis.Destination (String) |Object
+
+|`BRPOPLPUSH` |Pop a value from a list, push it to another list and return it; 
or block
+until one is available |CamelRedis.Key (String), CamelRedis.Destination 
(String),
+CamelRedis.Timeout (Long) |Object
+
+|`BLPOP` |Remove and get the first element in a list, or block until one is
+available |CamelRedis.Key (String), CamelRedis.Timeout (Long) |Object
+
+|`BRPOP` |Remove and get the last element in a list, or block until one is
+available |CamelRedis.Key (String), CamelRedis.Timeout (Long) |String
+|=======================================================================
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|Set Commands |Description |Parameters |Result
+
+|`SADD` |Add one or more members to a set |CamelRedis.Key (String), 
CamelRedis.Value (Object) |Boolean
+
+|`SMEMBERS` |Get all the members in a set |CamelRedis.Key (String) |Set<Object>
+
+|`SREM` |Remove one or more members from a set |CamelRedis.Key (String), 
CamelRedis.Value (Object) |Boolean
+
+|`SPOP` |Remove and return a random member from a set |CamelRedis.Key (String) 
|String
+
+|`SMOVE` |Move a member from one set to another |CamelRedis.Key (String), 
CamelRedis.Value (Object),
+CamelRedis.Destination (String) |Boolean
+
+|`SCARD` |Get the number of members in a set |CamelRedis.Key (String) |Long
+
+|`SISMEMBER` |Determine if a given value is a member of a set |CamelRedis.Key 
(String), CamelRedis.Value (Object) |Boolean
+
+|`SINTER` |Intersect multiple sets |CamelRedis.Key (String), CamelRedis.Keys 
(String) |Set<Object>
+
+|`SINTERSTORE` |Intersect multiple sets and store the resulting set in a key 
|CamelRedis.Key (String), CamelRedis.Keys (String),
+CamelRedis.Destination (String) |void
+
+|`SUNION` |Add multiple sets |CamelRedis.Key (String), CamelRedis.Keys 
(String) |Set<Object>
+
+|`SUNIONSTORE` |Add multiple sets and store the resulting set in a key 
|CamelRedis.Key (String), CamelRedis.Keys (String),
+CamelRedis.Destination (String) |void
+
+|`SDIFF` |Subtract multiple sets |CamelRedis.Key (String), CamelRedis.Keys 
(String) |Set<Object>
+
+|`SDIFFSTORE` |Subtract multiple sets and store the resulting set in a key 
|CamelRedis.Key (String), CamelRedis.Keys (String),
+CamelRedis.Destination (String) |void
+
+|`SRANDMEMBER` |Get one or multiple random members from a set |CamelRedis.Key 
(String) |String
+|=======================================================================
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|Ordered set Commands |Description |Parameters |Result
+
+|`ZADD` |Add one or more members to a sorted set, or update its score if it
+already exists |CamelRedis.Key (String), CamelRedis.Value (Object), 
CamelRedis.Score
+(Double) |Boolean
+
+|`ZRANGE` |Return a range of members in a sorted set, by index |CamelRedis.Key 
(String), CamelRedis.Start (Long), CamelRedis.End (Long),
+CamelRedis.WithScore (Boolean) |Object
+
+|`ZREM` |Remove one or more members from a sorted set |CamelRedis.Key 
(String), CamelRedis.Value (Object) |Boolean
+
+|`ZINCRBY` |Increment the score of a member in a sorted set |CamelRedis.Key 
(String), CamelRedis.Value (Object), CamelRedis.Increment
+(Double) |Double
+
+|`ZRANK` |Determine the index of a member in a sorted set |CamelRedis.Key 
(String), CamelRedis.Value (Object) |Long
+
+|`ZREVRANK` |Determine the index of a member in a sorted set, with scores 
ordered
+from high to low |CamelRedis.Key (String), CamelRedis.Value (Object) |Long
+
+|`ZREVRANGE` |Return a range of members in a sorted set, by index, with scores 
ordered
+from high to low |CamelRedis.Key (String), CamelRedis.Start (Long), 
CamelRedis.End (Long),
+CamelRedis.WithScore (Boolean) |Object
+
+|`ZCARD` |Get the number of members in a sorted set |CamelRedis.Key (String) 
|Long
+
+|`ZCOUNT` |Count the members in a sorted set with scores within the given 
values |CamelRedis.Key (String), CamelRedis.Min (Double), CamelRedis.Max
+(Double) |Long
+
+|`ZRANGEBYSCORE` |Return a range of members in a sorted set, by score 
|CamelRedis.Key (String), CamelRedis.Min (Double), CamelRedis.Max
+(Double) |Set<Object>
+
+|`ZREVRANGEBYSCORE` |Return a range of members in a sorted set, by score, with 
scores ordered
+from high to low |CamelRedis.Key (String), CamelRedis.Min (Double), 
CamelRedis.Max
+(Double) |Set<Object>
+
+|`ZREMRANGEBYRANK` |Remove all members in a sorted set within the given 
indexes |CamelRedis.Key (String), CamelRedis.Start (Long), CamelRedis.End 
(Long) |void
+
+|`ZREMRANGEBYSCORE` |Remove all members in a sorted set within the given 
scores |CamelRedis.Key (String), CamelRedis.Start (Long), CamelRedis.End (Long) 
|void
+
+|`ZUNIONSTORE` |Add multiple sorted sets and store the resulting sorted set in 
a new key |CamelRedis.Key (String), CamelRedis.Keys (String),
+CamelRedis.Destination (String) |void
+
+|`ZINTERSTORE` |Intersect multiple sorted sets and store the resulting sorted 
set in a
+new key |CamelRedis.Key (String), CamelRedis.Keys (String),
+CamelRedis.Destination (String) |void
+|=======================================================================
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|String Commands |Description |Parameters |Result
+
+|`SET` |Set the string value of a key |CamelRedis.Key (String), 
CamelRedis.Value (Object) |void
+
+|`GET` |Get the value of a key |CamelRedis.Key (String) |Object
+
+|`STRLEN` |Get the length of the value stored in a key |CamelRedis.Key 
(String) |Long
+
+|`APPEND` |Append a value to a key |CamelRedis.Key (String), CamelRedis.Value 
(String) |Integer
+
+|`SETBIT` |Sets or clears the bit at offset in the string value stored at key 
|CamelRedis.Key (String), CamelRedis.Offset (Long), CamelRedis.Value
+(Boolean) |void
+
+|`GETBIT` |Returns the bit value at offset in the string value stored at key 
|CamelRedis.Key (String), CamelRedis.Offset (Long) |Boolean
+
+|`SETRANGE` |Overwrite part of a string at key starting at the specified 
offset |CamelRedis.Key (String), CamelRedis.Value (Object), CamelRedis.Offset
+(Long) |void
+
+|`GETRANGE` |Get a substring of the string stored at a key |CamelRedis.Key 
(String), CamelRedis.Start (Long), CamelRedis.End (Long) |String
+
+|`SETNX` |Set the value of a key, only if the key does not exist 
|CamelRedis.Key (String), CamelRedis.Value (Object) |Boolean
+
+|`SETEX` |Set the value and expiration of a key |CamelRedis.Key (String), 
CamelRedis.Value (Object), CamelRedis.Timeout
+(Long), SECONDS |void
+
+|`DECRBY` |Decrement the integer value of a key by the given number 
|CamelRedis.Key (String), CamelRedis.Value (Long) |Long
+
+|`DECR` |Decrement the integer value of a key by one |CamelRedis.Key (String), 
|Long
+
+|`INCRBY` |Increment the integer value of a key by the given amount 
|CamelRedis.Key (String), CamelRedis.Value (Long) |Long
+
+|`INCR` |Increment the integer value of a key by one |CamelRedis.Key (String) 
|Long
+
+|`MGET` |Get the values of all the given keys |CamelRedis.Fields 
(Collection<String>) |List<Object>
+
+|`MSET` |Set multiple keys to multiple values |CamelRedis.Values(Map<String, 
Object>) |void
+
+|`MSETNX` |Set multiple keys to multiple values, only if none of the keys 
exist |CamelRedis.Key (String), CamelRedis.Value (Object) |void
+
+|`GETSET` |Set the string value of a key and return its old value 
|CamelRedis.Key (String), CamelRedis.Value (Object) |Object
+|=======================================================================
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|Key Commands |Description |Parameters |Result
+
+|`EXISTS` |Determine if a key exists |CamelRedis.Key (String) |Boolean
+
+|`DEL` |Delete a key |CamelRedis.Keys (String) |void
+
+|`TYPE` |Determine the type stored at key |CamelRedis.Key (String) |DataType
+
+|`KEYS` |Find all keys matching the given pattern |CamelRedis.Pattern (String) 
|Collection<String>
+
+|`RANDOMKEY` |Return a random key from the keyspace |CamelRedis.Pattern 
(String), CamelRedis.Value (String) |String
+
+|`RENAME` |Rename a key |CamelRedis.Key (String) |void
+
+|`RENAMENX` |Rename a key, only if the new key does not exist |CamelRedis.Key 
(String), CamelRedis.Value (String) |Boolean
+
+|`EXPIRE` |Set a key's time to live in seconds |CamelRedis.Key (String), 
CamelRedis.Timeout (Long) |Boolean
+
+|`SORT` |Sort the elements in a list, set or sorted set |CamelRedis.Key 
(String) |List<Object>
+
+|`PERSIST` |Remove the expiration from a key |CamelRedis.Key (String) |Boolean
+
+|`EXPIREAT` |Set the expiration for a key as a UNIX timestamp |CamelRedis.Key 
(String), CamelRedis.Timestamp (Long) |Boolean
+
+|`PEXPIRE` |Set a key's time to live in milliseconds |CamelRedis.Key (String), 
CamelRedis.Timeout (Long) |Boolean
+
+|`PEXPIREAT` |Set the expiration for a key as a UNIX timestamp specified in
+milliseconds |CamelRedis.Key (String), CamelRedis.Timestamp (Long) |Boolean
+
+|`TTL` |Get the time to live for a key |CamelRedis.Key (String) |Long
+
+|`MOVE` |Move a key to another database |CamelRedis.Key (String), 
CamelRedis.Db (Integer) |Boolean
+|=======================================================================
+
+[width="100%",cols="20%,20%,20%,60%",options="header",]
+|=======================================================================
+|Other Command |Description |Parameters |Result
+
+|`MULTI` |Mark the start of a transaction block |none |void
+
+|`DISCARD` |Discard all commands issued after MULTI |none |void
+
+|`EXEC` |Execute all commands issued after MULTI |none |void
+
+|`WATCH` |Watch the given keys to determine execution of the MULTI/EXEC block 
|CamelRedis.Keys (String) |void
+
+|`UNWATCH` |Forget about all watched keys |none |void
+
+|`ECHO` |Echo the given string |CamelRedis.Value (String) |String
+
+|`PING` |Ping the server |none |String
+
+|`QUIT` |Close the connection |none |void
+
+|`PUBLISH` |Post a message to a channel |CamelRedis.Channel (String), 
CamelRedis.Message (Object) |void
+|=======================================================================
+
+[[SpringRedis-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+Maven users will need to add the following dependency to their pom.xml.
+
+*pom.xml*
+
+[source,xml]
+-----------------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-spring-redis</artifactId>
+    <version>${camel-version}</version>
+</dependency>
+-----------------------------------------------
+
+where `${camel-version`} must be replaced by the actual version of Camel
+(2.11 or higher).
+
+[[SpringRedis-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/438273db/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 84796e7..7639688 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -252,6 +252,7 @@
     * [Spring-Integration](spring-integration.adoc)
     * [Spring-Javaconfig](spring-java-config.adoc)
     * [Spring-Ldap](spring-ldap.adoc)
+    * [Spring-Redis](spring-redis.adoc)
     * [Telegram](telegram.adoc)
     * [Twitter](twitter.adoc)
     * [Websocket](websocket.adoc)

Reply via email to