List of usage examples for org.springframework.data.redis.listener.adapter MessageListenerAdapter MessageListenerAdapter
public MessageListenerAdapter(Object delegate, String defaultListenerMethod)
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"); }