2

I created a Pollable Channel in my interface :

Channels.java:

final String INPUT = "input";

@Input(INPUT)
PollableChannel input();

In my service i have :

Service.java

@Autowired
@Qualifier(Channels.INPUT)
private PollableChannel input;

@ServiceActivator(inputChannel = Channels.INPUT)
public void method() {

    Message<?> msg = input.receive();

I am unable to start my spring application, getting this exception :

**Caused by: java.lang.IllegalStateException: No factory found binding target type: org.springframework.messaging.PollableChannel for channelFactory**

NOTE: I have an output channel for my service which works fine, so i didnt post te code here

usr1234
  • 61
  • 2
  • 9

1 Answers1

3

PollableChannel is not supported for Binding. You can see more information on this here

Ilayaperumal Gopinathan
  • 4,099
  • 1
  • 13
  • 12
  • Would you be able to elaborate how to use a PollableChannel and Bridge to my output channel? How can i use this channel in my code? – usr1234 May 17 '17 at 07:11
  • You can check this PR https://github.com/spring-cloud/spring-cloud-stream/pull/460 as an example. But as pointed out in that PR, it is not recommended for the reasons specified. In Spring Cloud Stream, we explicitly use `SubscribableChannelBindingTargetFactory` for both input and output. May be you need to customize on it if you want to proceed anyway. Please feel free open issue with your requirements at Github if you think this can be supported. – Ilayaperumal Gopinathan May 17 '17 at 07:37