publishSubscriber metodu
Örnek
Şöyle yaparız.
Şöyle yaparız.
Örnek
Şöyle yaparız.
@Configuration
public class FTPIntegration {
@Bean
public MessageChannel outputIntegrationChannel(ErrorHandler errorHandler) {
return MessageChannels
.publishSubscribe()
.errorHandler(errorHandler)
.get();
}
@Bean
public IntegrationFlow ftpIntegration(ErrorHandler errorHandler,
MessageHandler messageHandler) {
return IntegrationFlows
.from(outputIntegrationChannel(errorHandler))
.transform(Transformers.toJson())
.handle(messageHandler)
.get();
}
}
ÖrnekŞöyle yaparız.
@Bean(name = {"publishCha.input", "publishCha2.input"}) //2 subscribers
public MessageChannel publishAction() {
PublishSubscribeChannel ps = MessageChannels.publishSubscribe().get();
ps.setMaxSubscribers(8);
return ps;
}
Hiç yorum yok:
Yorum Gönder