I've been trying to configure spring integration dsl to read from a Tibco EMS topic , do some processing on the received message and then push it to an ActiveMQ queue. I was able to set this up successfully using XML configuration, but wanted to use spring integration dsl instead. I couldn't figure out, neither could find any help online about it.
My configuration for pushing message to ActiveMQ is something like this -
@Bean
public IntegrationFlow toActiveMQFlow(
MessageChannel channel,
ActiveMQQueue queue,
CachingConnectionFactory cachingConnectionFactory) {
return IntegrationFlows.from(channel)
.transform(Object::toString)
.handle(Jms.outboundAdapter(cachingConnectionFactory).destination(queue))
.get();
}
And I'm thinking that the configuration for reading from Tibco EMS topics should be something like this -
@Bean
public IntegrationFlow fromTibcoTopicFlow(
MessageChannel channel,
ConnectionFactory tibcoEmsConnectionFactory,
Topic tibcoTopic
) {
return IntegrationFlows
.from(SomeInboundAdapter(tibcoEmsConnectionFactory).destination(tibcoTopic))
.transform(Object::toString)
.channel(channel)
.get();
}
Since I did not find much help on the latter configuration, is resorting to the XML configuration my only option here?
Kindly correct/edit/point out any mistakes I've made, still learning Spring Integration DSL.
Appreciate your help!
tibcoEmsConnectionFactory
is about JMS as well? Doesn'tJms.messageDrivenChannelAdapter()
work for you? – Artem BilanCannot resolve method 'from(org.springframework.integration.dsl.jms.JmsMessageDrivenChannelAdapterSpec.JmsMessageDrivenChannelAdapterListenerContainerSpec<org.springframework.integration.dsl.jms.JmsDefaultListenerContainerSpec,org.springframework.jms.listener.DefaultMessageListenerContainer>)'
I'm using spring-integration-core 5.0.7.RELEASE and spring-integration-java-dsl 1.2.2.RELEASE – Adee J5.0
you shouldn't use that extra artifact for Java DSL. It is now included into the core project. See github.com/spring-projects/spring-integration-java-dsl/wiki/…:This project has been absorbed by Spring Integration Core starting with version 5.0.
– Artem Bilan