use of org.springframework.cloud.stream.binder.DefaultPollableMessageSource in project spring-cloud-stream by spring-cloud.
the class MessageConverterConfigurer method configurePolledMessageSource.
@Override
public void configurePolledMessageSource(PollableMessageSource binding, String name) {
BindingProperties bindingProperties = this.bindingServiceProperties.getBindingProperties(name);
String contentType = bindingProperties.getContentType();
ConsumerProperties consumerProperties = bindingProperties.getConsumer();
if ((consumerProperties == null || !consumerProperties.isUseNativeDecoding()) && binding instanceof DefaultPollableMessageSource) {
((DefaultPollableMessageSource) binding).addInterceptor(new InboundContentTypeEnhancingInterceptor(contentType));
}
}
use of org.springframework.cloud.stream.binder.DefaultPollableMessageSource in project spring-cloud-stream by spring-cloud.
the class MessageSourceBindingTargetFactory method createInput.
@Override
public PollableMessageSource createInput(String name) {
DefaultPollableMessageSource binding = new DefaultPollableMessageSource(this.messageConverter);
this.messageSourceConfigurer.configurePolledMessageSource(binding, name);
return binding;
}
Aggregations