Home > database >  Spring integration file with JMS outbound adapter
Spring integration file with JMS outbound adapter

Time:02-25

I'm working on a project where I poll files on a directory using spring integration file into an inbound channel, do some stuff with it, and then publish the result to MQ using a <int-jms:outbound-channel-adapter> But I can't find any useful examples on how to implement this solution without going through xml configuration files.

Im not sure if the folowing example would be the solution for this case though

@Bean
public IntegrationFlow jmsOutboundGatewayFlow() {
    return IntegrationFlows.from("jmsOutboundGatewayChannel")
            .handle(Jms.outboundGateway(this.jmsConnectionFactory)
                        .replyContainer(c ->
                                    c.concurrentConsumers(3)
                                            .sessionTransacted(true))
                        .requestDestination("jmsPipelineTest"))
            .get();
}

CodePudding user response:

The gateway is for request/reply processing; use one of the Jms.outboundAdapter() methods for send only.

  • Related