You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark Nuttall <mk...@gmail.com> on 2017/03/28 18:23:12 UTC

can Redis BLPOP (and etc) be used in a consumer URI?

I am looking at the documentation and examples and have been testing with
the Redis component. It seems that the only command that will work in a
consumer URI is SUBSCRIBE  and PSUBSCRIBE . It seems that only works with
PUBLISH. Pub/Sub in REDIS is not persistent. I need  something that is. If
i put anything other than subscribe or psubscribe, i get an unsupported
error. I need to be able to have a "from" that blocks on BPLOP. The example
code uses "sendHeaders" in the via the test helper class but does not block.

(fyi, i'd use ActiveMQ but "we" are switching to SQS and that comes with
another host of issues and i just need some worker queues)

Any ideas?

Re: can Redis BLPOP (and etc) be used in a consumer URI?

Posted by Mark Nuttall <mk...@gmail.com>.
Thanks. That is what I saw too. I dug through the code and I didnt see any
thing else supported. I was hoping for a sanity check. :)

Anyway, since Redis pub/sub seems to add no value over embedded activemq or
SEDA, and actually means an external dependency, I am not going to use
Redis for queues. I guess it (Redis Pub/Sub) is for platforms that don't
have the options that Java has.

On Wed, Mar 29, 2017 at 12:46 AM, Tomohisa Igarashi <tm...@gmail.com>
wrote:

> Hi,
>
> I don't know much about Redis though, it seems the PSUBSCRIBE and
> SUBSCRIBE are the only two supported for consumer.
> https://github.com/apache/camel/blob/master/components/camel
> -spring-redis/src/main/java/org/apache/camel/component/
> redis/RedisConsumer.java#L54
>
> You may want to file a JIRA for the enhancement.
>
> Thanks,
> Tomo
>
>
> On 03/29/2017 03:23 AM, Mark Nuttall wrote:
>
>> I am looking at the documentation and examples and have been testing with
>> the Redis component. It seems that the only command that will work in a
>> consumer URI is SUBSCRIBE  and PSUBSCRIBE . It seems that only works with
>> PUBLISH. Pub/Sub in REDIS is not persistent. I need  something that is. If
>> i put anything other than subscribe or psubscribe, i get an unsupported
>> error. I need to be able to have a "from" that blocks on BPLOP. The
>> example
>> code uses "sendHeaders" in the via the test helper class but does not
>> block.
>>
>> (fyi, i'd use ActiveMQ but "we" are switching to SQS and that comes with
>> another host of issues and i just need some worker queues)
>>
>> Any ideas?
>>
>>

Re: can Redis BLPOP (and etc) be used in a consumer URI?

Posted by Tomohisa Igarashi <tm...@gmail.com>.
Hi,

I don't know much about Redis though, it seems the PSUBSCRIBE and SUBSCRIBE are the only two supported for consumer.
https://github.com/apache/camel/blob/master/components/camel-spring-redis/src/main/java/org/apache/camel/component/redis/RedisConsumer.java#L54

You may want to file a JIRA for the enhancement.

Thanks,
Tomo

On 03/29/2017 03:23 AM, Mark Nuttall wrote:
> I am looking at the documentation and examples and have been testing with
> the Redis component. It seems that the only command that will work in a
> consumer URI is SUBSCRIBE  and PSUBSCRIBE . It seems that only works with
> PUBLISH. Pub/Sub in REDIS is not persistent. I need  something that is. If
> i put anything other than subscribe or psubscribe, i get an unsupported
> error. I need to be able to have a "from" that blocks on BPLOP. The example
> code uses "sendHeaders" in the via the test helper class but does not block.
>
> (fyi, i'd use ActiveMQ but "we" are switching to SQS and that comes with
> another host of issues and i just need some worker queues)
>
> Any ideas?
>