Установить ключ/значение redis с помощью camel-redis
Я хочу установить пару ключ / значение с помощью camel-redis. Я пытаюсь:
spring-redis://localhost:6379?command=SET&CamelRedis.key=testkey&CamelRedis.value=100
Но никакой радости. Я получаю ошибку:
There are 2 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{key=testkey, value=100}]
Хотя есть много примеров о том, как подписаться и т.д. Я не нахожу ни одного примера, как установить пару ключ / значение. Как бы я это сделал?
1 ответ:
CamelRedis.KeyиCamelRedis.Value(Будьте осторожны, они чувствительны к регистру) являются заголовками сообщений, а не параметрами URI<route> <from uri="direct:intput"/> <setHeader headerName="CamelRedis.Key"><constant>testkey</constant></setHeader> <setHeader headerName="CamelRedis.Value"><constant>100</constant></setHeader> <to uri="spring-redis://localhost:6379?command=SET"/> </route>
Comments