/*
 * Copyright 2015 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.cloud.stream.binder.redis.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.stream.binder.redis.RedisMessageChannelBinder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.integration.codec.Codec;

/**
 * @author David Turanski
 */
@Configuration
@EnableConfigurationProperties(RedisBinderConfigurationProperties.class)
@ConfigurationProperties(prefix = "spring.cloud.stream.binder.redis")
public class RedisMessageChannelBinderConfiguration {
	
	private String[] headers;

	@Autowired 
	private Codec codec;

	@Autowired
	private RedisBinderConfigurationProperties redisBinderConfigurationProperties;
	
	@Autowired
	private RedisConnectionFactory redisConnectionFactory;

	@Bean
	public RedisMessageChannelBinder redisMessageChannelBinder() {

		RedisMessageChannelBinder redisMessageChannelBinder = new RedisMessageChannelBinder(redisConnectionFactory, 
				headers);
		redisMessageChannelBinder.setCodec(codec);
		redisMessageChannelBinder.setDefaultBackOffInitialInterval(redisBinderConfigurationProperties.getBackOffInitialInterval());
		redisMessageChannelBinder.setDefaultBackOffMaxInterval(redisBinderConfigurationProperties.getBackOffMaxInterval());
		redisMessageChannelBinder.setDefaultBackOffMultiplier(redisBinderConfigurationProperties.getBackOffMultiplier());
		redisMessageChannelBinder.setDefaultConcurrency(redisBinderConfigurationProperties.getConcurrency());
		redisMessageChannelBinder.setDefaultMaxAttempts(redisBinderConfigurationProperties.getMaxAttempts());
		return redisMessageChannelBinder;
	}

	public void setHeaders(String[] headers) {
		this.headers = headers;
	}
}

@@ -1456,18 +1456,17 @@
 ation %7B%0A
-%09
 %0A
+
 %09private
@@ -1496,17 +1496,16 @@
 utowired
- 
 %0A%09privat
@@ -1616,10 +1616,9 @@
 es;%0A
-%09
 %0A
+
 %09@Au
@@ -1840,16 +1840,21 @@
 lBinder(
+this.
 redisCon
@@ -1872,14 +1872,18 @@
 ory,
- 
 %0A%09%09%09%09
+this.
 head
@@ -1925,16 +1925,21 @@
 etCodec(
+this.
 codec);%0A
@@ -1991,32 +1991,37 @@
 InitialInterval(
+this.
 redisBinderConfi
@@ -2126,16 +2126,21 @@
 nterval(
+this.
 redisBin
@@ -2248,16 +2248,21 @@
 tiplier(
+this.
 redisBin
@@ -2363,16 +2363,21 @@
 urrency(
+this.
 redisBin
@@ -2472,16 +2472,21 @@
 ttempts(
+this.
 redisBin
@@ -2571,16 +2571,75 @@
 er;%0A%09%7D%0A%0A
+%09public String%5B%5D getHeaders() %7B%0A%09%09return this.headers;%0A%09%7D%0A%0A
 %09public 

Add getter to array property for binding