Handle binder config in BindingProperties
- Per-binding properties defined in `BindingProperties` need to hold the binder specific configurations needed when binding producer/consumers. Previously, these were added in `ChannelBindingServiceProperties` as producer/consumer properties. Since these configuration properties are for per-binding based on the input/output (consumer/producer) channel being bound it is better to move these properties into `BindingProperties`. - Add some of the supported producer/consumer properties into BindingProperties - This fixes #256 Rename CommonBinderProperties -> BinderPropertyKeys Rename class AbstractBinderPropertiesAccessor.java -> AbstractBindingPropertiesAccessor.java
This commit is contained in:
committed by
Mark Fisher
parent
373dd12fbb
commit
fa89e5bcb6
@@ -247,7 +247,7 @@ public abstract class AbstractBinderTests {
|
||||
@Test
|
||||
public void testBadDynamic() throws Exception {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(BinderProperties.PARTITION_KEY_EXPRESSION, "'foo'");
|
||||
properties.setProperty(BinderPropertyKeys.PARTITION_KEY_EXPRESSION, "'foo'");
|
||||
Binder<MessageChannel> binder = getBinder();
|
||||
try {
|
||||
binder.bindDynamicProducer("queue:foo", properties);
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class BrokerBinderTests extends
|
||||
public void testDirectBinding() throws Exception {
|
||||
Binder binder = getBinder();
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(BinderProperties.DIRECT_BINDING_ALLOWED, "true");
|
||||
properties.setProperty(BinderPropertyKeys.DIRECT_BINDING_ALLOWED, "true");
|
||||
|
||||
DirectChannel moduleInputChannel = new DirectChannel();
|
||||
moduleInputChannel.setBeanName("direct.input");
|
||||
|
||||
@@ -86,8 +86,8 @@ abstract public class PartitionCapableBinderTests extends BrokerBinderTests {
|
||||
Properties properties = new Properties();
|
||||
properties.put("partitionKeyExpression", "payload");
|
||||
properties.put("partitionSelectorExpression", "hashCode()");
|
||||
properties.put(BinderProperties.NEXT_MODULE_COUNT, "3");
|
||||
properties.put(BinderProperties.NEXT_MODULE_CONCURRENCY, "2");
|
||||
properties.put(BinderPropertyKeys.NEXT_MODULE_COUNT, "3");
|
||||
properties.put(BinderPropertyKeys.NEXT_MODULE_CONCURRENCY, "2");
|
||||
|
||||
DirectChannel output = new DirectChannel();
|
||||
output.setBeanName("test.output");
|
||||
@@ -187,8 +187,8 @@ abstract public class PartitionCapableBinderTests extends BrokerBinderTests {
|
||||
Properties properties = new Properties();
|
||||
properties.put("partitionKeyExtractorClass", "org.springframework.cloud.stream.binder.PartitionTestSupport");
|
||||
properties.put("partitionSelectorClass", "org.springframework.cloud.stream.binder.PartitionTestSupport");
|
||||
properties.put(BinderProperties.NEXT_MODULE_COUNT, "3");
|
||||
properties.put(BinderProperties.NEXT_MODULE_CONCURRENCY, "2");
|
||||
properties.put(BinderPropertyKeys.NEXT_MODULE_COUNT, "3");
|
||||
properties.put(BinderPropertyKeys.NEXT_MODULE_CONCURRENCY, "2");
|
||||
|
||||
DirectChannel output = new DirectChannel();
|
||||
output.setBeanName("test.output");
|
||||
|
||||
Reference in New Issue
Block a user