MDC with Lettuce's RedisFuture
Mia Lopez
I am using lettuce-core 6.2.6.RELEASE with Kotlin 1.9.10.
I'm currently using lettuce to subscribe to channels and would like to log with the parent thread's MDC context when a message is received from Redis.
Anyone know if this is possible with the current implementation of lettuce?
I'm curious if there's a way to update this code in order to pass the MDC values to it.
val client = RedisClient.create(this.config.target)
val connection: StatefulRedisPubSubConnection<String, String> = client.connectPubSub()
connection.addListener(listener)
val async = connection.async()
val futureSub = async.subscribe(this.config.channels[0])
futureSub.await() Related questions 1 Subscribe to redis channel (pubsub) using lettuce reactive commands 0 Values saved in Redis using Spring Data have weird prefixes 8 spring data redis with lettuce connection pool configuration Related questions 1 Subscribe to redis channel (pubsub) using lettuce reactive commands 0 Values saved in Redis using Spring Data have weird prefixes 8 spring data redis with lettuce connection pool configuration 0 What is the right way to read a zset in a redis cluster with an open-ended max bound with lettuce? 6 Integrating Behave or Lettuce with Python unittest 1 Testing Django models with Lettuce? 1 Can't access outbox while testing with lettuce 1 RedisTemplate get list with value operation Load 5 more related questions Show fewer related questions Reset to default