Fix multi-binder sample to update the extended properties changes

This commit is contained in:
Ilayaperumal Gopinathan
2016-03-22 17:59:49 +05:30
parent d029722d85
commit 30a352e411
2 changed files with 11 additions and 7 deletions

View File

@@ -30,6 +30,8 @@ import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.cloud.stream.binder.BinderFactory;
import org.springframework.cloud.stream.binder.ExtendedConsumerProperties;
import org.springframework.cloud.stream.binder.ExtendedProducerProperties;
import org.springframework.cloud.stream.binder.ProducerProperties;
import org.springframework.cloud.stream.binder.rabbit.RabbitConsumerProperties;
import org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder;
@@ -82,11 +84,11 @@ public class RabbitAndRedisBinderApplicationTests {
public void messagingWorks() {
DirectChannel dataProducer = new DirectChannel();
((RedisMessageChannelBinder)binderFactory.getBinder("redis"))
.bindProducer("dataIn", dataProducer, new ProducerProperties());
.bindProducer("dataIn", dataProducer, new ExtendedProducerProperties<>(new ProducerProperties()));
QueueChannel dataConsumer = new QueueChannel();
((RabbitMessageChannelBinder)binderFactory.getBinder("rabbit")).bindConsumer("dataOut", this.randomGroup,
dataConsumer, new RabbitConsumerProperties());
dataConsumer, new ExtendedConsumerProperties<>(new RabbitConsumerProperties()));
String testPayload = "testFoo" + this.randomGroup;
dataProducer.send(MessageBuilder.withPayload(testPayload).build());