Example usage for org.springframework.data.redis.listener.adapter MessageListenerAdapter MessageListenerAdapter

List of usage examples for org.springframework.data.redis.listener.adapter MessageListenerAdapter MessageListenerAdapter

Introduction

In this page you can find the example usage for org.springframework.data.redis.listener.adapter MessageListenerAdapter MessageListenerAdapter.

Prototype

public MessageListenerAdapter(Object delegate, String defaultListenerMethod) 

Source Link

Document

Create a new MessageListenerAdapter for the given delegate.

Usage

From source file:eu.supersede.fe.listener.Listeners.java

@Bean
RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory) {
    RedisMessageListenerContainer container = new RedisMessageListenerContainer();
    container.setConnectionFactory(connectionFactory);

    MessageListenerAdapter profileAdapter = new MessageListenerAdapter(profileListener, "receiveMessage");
    profileAdapter.afterPropertiesSet();
    container.addMessageListener(profileAdapter, new PatternTopic("profile"));

    MessageListenerAdapter notificationAdapter = new MessageListenerAdapter(notificationListener,
            "receiveMessage");
    notificationAdapter.afterPropertiesSet();
    container.addMessageListener(notificationAdapter, new PatternTopic("notification"));

    return container;
}

From source file:org.apereo.openlrs.storage.redis.RedisPubSubConfig.java

@Bean
MessageListenerAdapter listenerAdapter(RedisPubSubTierTwoMessageReceiver receiver) {
    return new MessageListenerAdapter(receiver, "onMessage");
}

From source file:org.apereo.openlrs.RedisElasticsearchConfig.java

@Conditional(RedisEnabledCondition.class)
@Bean/*from w  w w.  j  av a 2  s.  c  om*/
MessageListenerAdapter listenerAdapter(ElasticSearchStatementRepository receiver) {
    return new MessageListenerAdapter(receiver, "onMessage");
}