LettuceConnection publish message is not working

15 views
Skip to first unread message

kara...@gmail.com

unread,
Nov 15, 2018, 1:43:14 AM11/15/18
to lettuce-redis-client-users
Hi all,
Here is my code in my spring boot 2 project
redis and lettuce configuration in application.yaml

redis:
  host: ${COURSE_SERVICE_REDIS_HOST:localhost}
 
port: ${COURSE_SERVICE_REDIS_PORT:6379}
 
lettuce:
    pool:
      max-active: 8
     
max-idle: 4
     
min-idle: 2
     
max-wait: -1ms
   
shutdown-timeout: 100ms

my code to publish message here
LettuceConnection connection = (LettuceConnection)this.connectionFactory.getConnection();
...
connection.publish(topicName.getBytes(), ObjectUtil.toBytes(eventObj));

but it not work, without any exception, no data in redis

anyone, pls help, thank!

Mark Paluch

unread,
Nov 15, 2018, 3:47:30 AM11/15/18
to lettuce-redis-client-users, kara...@gmail.com
What can you see when you enter Redis monitor mode using redis-cli?
--
You received this message because you are subscribed to the Google Groups "lettuce-redis-client-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lettuce-redis-clien...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lettuce-redis-client-users/b68b80fd-197c-4a2e-b051-4e7847f9d3ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kara...@gmail.com

unread,
Nov 15, 2018, 3:52:52 AM11/15/18
to lettuce-redis-client-users
Ah, I not start subscriber so that I can receive message, but I think redis client will put message into redis, but it not.

I use a software GUI redis client to check, can you give me the cli command?

On Thursday, November 15, 2018 at 3:47:30 PM UTC+7, Mark Paluch wrote:
What can you see when you enter Redis monitor mode using redis-cli?
Am 15. Nov. 2018, 06:43 +0000 schrieb kara...@gmail.com:
Hi all,
Here is my code in my spring boot 2 project
redis and lettuce configuration in application.yaml

redis:
host: ${COURSE_SERVICE_REDIS_HOST:localhost}
port: ${COURSE_SERVICE_REDIS_PORT:6379}
lettuce:
pool:
max-active: 8
max-idle: 4
min-idle: 2
max-wait: -1ms
shutdown-timeout: 100ms

my code to publish message here
LettuceConnection connection = (LettuceConnection)this.connectionFactory.getConnection();
...
connection.publish(topicName.getBytes(), ObjectUtil.toBytes(eventObj));

but it not work, without any exception, no data in redis

anyone, pls help, thank!

--
You received this message because you are subscribed to the Google Groups "lettuce-redis-client-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lettuce-redis-client-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages