Spring Data Redis
  1. Spring Data Redis
  2. DATAREDIS-107

RedisMessageListenerContainer: remove MessageListener programmatically.

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.3
    • Component/s: None
    • Environment:
      Hardware: CPU Intel(R) Xeon(R) CPU E5640 @ 2.67GHz, MEM 2055668 kB.
      Software: Linux 3.2.0-31-generic x86_64, JRE 1.7, Apache Tomcat 7.0.32, SpringFramework Data Redis 1.0.2.RELEASE.

      Description

      Hi,

      Currently, in my web application I'm adding listeners programmatically:

      DefaultActionRedisMessageListenerContainer.java
      @ActionListenerContainer(value = "actionRedisMessageListenerContainer")
      public class DefaultActionRedisMessageListenerContainer extends AActionRedisMessageListenerContainer implements IActionRedisMessageListenerContainer {
      
      	...
      
      	private final RedisMessageListenerContainer redisMessageListenerContainer;
      
      	...
      
      	@Autowired
      	public ActionRedisMessageListenerContainerImpl(RedisMessageListenerContainer redisMessageListenerContainer) {
      		this.redisMessageListenerContainer = redisMessageListenerContainer;
      	}
      
      	...
      
      	@Override
      	public void addMessageListener(..., ChannelTopic channel, MessageListenerAdapter messageListener, ...)
      		...
      		this.redisMessageListenerContainer.addMessageListener(messageListener, channel);
      		...
      	}
      
      	@Override
      	public void removeMessageListener(..., ChannelTopic channel, ...) {
      		// TODO Remove???		
      		// this.redisMessageListenerContainer...
      	}
      
      	...
      
      }
      

      But I need remove a listener in particular from container (see: public void removeMessageListener...).

      RedisMessageListenerContainer: https://github.com/SpringSource/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/listener/RedisMessageListenerContainer.java

        Activity

        Hide
        Costin Leau added a comment -

        Fixed for this available in master.
        Feedback welcome.

        Show
        Costin Leau added a comment - Fixed for this available in master. Feedback welcome.

          People

          • Assignee:
            Costin Leau
            Reporter:
            Sergio Tudela Romero
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: