when trying to create a listener container with both pattern and topic listeners I get exception:
Code:<redis:listener-container connection-factory="connectionFactory" > <!-- the method attribute can be skipped as the default method name is "handleMessage" --> <redis:listener ref="logMessageDelegate" method="handleMessage" topic="logChannel:*" /> <redis:listener ref="contentScraperDelegate" method="onMessage" topic="logChannel" /> </redis:listener-container>
Exception:
Exception in thread "org.springframework.data.redis.listener.RedisMess ageListenerContainer#0-1" org.springframework.dao.InvalidDataAccessApiUsageE xception: ERR multi bulk protocol error; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR multi bulk protocol error
at org.springframework.data.redis.connection.jedis.Je disUtils.convertJedisAccessException(JedisUtils.ja va:72)
at org.springframework.data.redis.connection.jedis.Je disConnection.convertJedisAccessException(JedisCon nection.java:113)
at org.springframework.data.redis.connection.jedis.Je disConnection.subscribe(JedisConnection.java:2341)
at org.springframework.data.redis.listener.RedisMessa geListenerContainer$SubscriptionTask.run(RedisMess ageListenerContainer.java:573)
at java.lang.Thread.run(Thread.java:662)
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR multi bulk protocol error
at redis.clients.jedis.Protocol.processError(Protocol .java:54)
at redis.clients.jedis.Protocol.process(Protocol.java :61)
at redis.clients.jedis.Protocol.read(Protocol.java:12 2)
at redis.clients.jedis.Connection.getObjectMultiBulkR eply(Connection.java:196)
at redis.clients.jedis.BinaryJedisPubSub.process(Bina ryJedisPubSub.java:80)
at redis.clients.jedis.BinaryJedisPubSub.proceed(Bina ryJedisPubSub.java:75)
at redis.clients.jedis.BinaryJedis.subscribe(BinaryJe dis.java:2997)
at org.springframework.data.redis.connection.jedis.Je disConnection.subscribe(JedisConnection.java:2338)
... 2 more
If I use both pattern listeners or both topic listeners it works OK.
I could not find anything in the documentation about this.
Code:<redis:listener-container connection-factory="connectionFactory" > <!-- the method attribute can be skipped as the default method name is "handleMessage" --> <redis:listener ref="logMessageDelegate" method="handleMessage" topic="logChannel:*" /> <redis:listener ref="contentScraperDelegate" method="onMessage" topic="logChannel:*" /> </redis:listener-container>


Reply With Quote
