Code example for SyncTaskExecutor

Methods: sleep

0
 
		container = new RedisMessageListenerContainer();
		container.setConnectionFactory(template.getConnectionFactory());
		container.setBeanName("container");
		container.addMessageListener(adapter, Arrays.asList(new ChannelTopic(CHANNEL)));
		container.setTaskExecutor(new SyncTaskExecutor());
		container.setSubscriptionExecutor(new SimpleAsyncTaskExecutor());
		container.afterPropertiesSet();
		container.start();
 
		Thread.sleep(1000);
	} 
 
	@After 
	public void tearDown() throws Exception {
		container.destroy();
	} 
 
	@SuppressWarnings("rawtypes") 
	public PubSubTests(ObjectFactory<T> factory, RedisTemplate template) {