@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(requests()) .handle(Jms.outboundAdapter(connectionFactory).destination("requests")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("replies")) .channel(replies()) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("requests")) .channel(requests()) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(replies()) .handle(Jms.outboundAdapter(connectionFactory).destination("replies")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("replies")) .channel(replies()) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(requests()) .handle(Jms.outboundAdapter(connectionFactory).destination("requests")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("requests")) .channel(requests()) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(requests()) .handle(Jms.outboundAdapter(connectionFactory).destination("requests")) .get(); }
@Bean public IntegrationFlow outboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(replies()) .handle(Jms.outboundAdapter(connectionFactory).destination("replies")) .get(); }
@Bean public IntegrationFlow inboundFlow(ActiveMQConnectionFactory connectionFactory) { return IntegrationFlows .from(Jms.messageDrivenChannelAdapter(connectionFactory).destination("requests")) .channel(requests()) .get(); }
/** * Create an {@link IntegrationFlow} with a {@link ChunkProcessorChunkHandler} * configured as a service activator listening to the input channel and replying * on the output channel. * * @return the integration flow */ @SuppressWarnings({"unchecked", "rawtypes"}) public IntegrationFlow build() { Assert.notNull(this.itemWriter, "An ItemWriter must be provided"); Assert.notNull(this.inputChannel, "An InputChannel must be provided"); Assert.notNull(this.outputChannel, "An OutputChannel must be provided"); if(this.itemProcessor == null) { this.itemProcessor = new PassThroughItemProcessor(); } SimpleChunkProcessor<I, O> chunkProcessor = new SimpleChunkProcessor<>(this.itemProcessor, this.itemWriter); ChunkProcessorChunkHandler<I> chunkProcessorChunkHandler = new ChunkProcessorChunkHandler<>(); chunkProcessorChunkHandler.setChunkProcessor(chunkProcessor); return IntegrationFlows .from(this.inputChannel) .handle(chunkProcessorChunkHandler, SERVICE_ACTIVATOR_METHOD_NAME) .channel(this.outputChannel) .get(); }
.from(this.inputChannel) .handle(stepExecutionRequestHandler, SERVICE_ACTIVATOR_METHOD_NAME) .channel(this.outputChannel)
partitionHandler.setReplyChannel(replies); StandardIntegrationFlow standardIntegrationFlow = IntegrationFlows .from(this.inputChannel) .aggregate(aggregatorSpec -> aggregatorSpec.processor(partitionHandler)) .channel(replies)
@Bean public IntegrationFlow staticFlow() { return IntegrationFlows.from("channelOne") .nullChannel(); }
@Bean public IntegrationFlow methodInvokingFlow() { return IntegrationFlows.from("methodInvokingInput") .handle(this.greetingService) .get(); }
@Bean public IntegrationFlow routeMethodInvocationFlow2() { return IntegrationFlows.from("routerMethod2Input") .route(new RoutingTestBean()) .get(); }
@Bean public Publisher<Message<String>> singleChannelFlow() { return IntegrationFlows .from(MessageChannels.direct("singleChannel")) .log() .toReactivePublisher(); }
@Bean public IntegrationFlow errorRecovererFlow() { return IntegrationFlows.from(Function.class, "errorRecovererFunction") .handle((GenericHandler<?>) (p, h) -> { throw new RuntimeException("intentional"); }, e -> e.advice(retryAdvice())) .get(); }
@Bean public IntegrationFlow myFlow() { return IntegrationFlows .from(() -> new GenericMessage<>("myData"), e -> e.id("mySourceEndpoint")) .<String, String>transform(String::toUpperCase) .channel(results()) .get(); }
@Bean public IntegrationFlow jmsInboundFlow() { return IntegrationFlows .from(Jms.inboundAdapter(jmsConnectionFactory()).destination("jmsInbound")) .<String, String>transform(String::toUpperCase) .channel(this.jmsOutboundInboundReplyChannel()) .get(); }