Meow
Meow

Reputation: 135

Spring integration file with JMS outbound adapter

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();
}

Upvotes: 0

Views: 329

Answers (1)

Gary Russell
Gary Russell

Reputation: 174829

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

Upvotes: 1

Related Questions