Java configuration for int-jms:outbound-channel-adapter from spring integration -


i trying convert xml based configuration java based configuration. can please let me know java annotation based configuration following

<jms:outbound-channel-adapter channel="requestchannel"                               connection-factory="testconnectionfactory"                               destination-name="${jms.queuename}"                                message-converter="messageconverter"/> 

i tried having @ reference doc. not able understand how map above xml annotation config.

@serviceactivator(inputchannel="requestchannel") @bean public messagehandler outbound(jmstemplate jmstemplate) {     jmssendingmessagehandler handler = new jmssendingmessagehandler(jmstemplate);     handler.setdestinationname(...);     ...     return handler; }  @bean public jmstemplate jmstemplate(connectionfactory jmsconnectionfactory) {     ...     template.setmessageconverter(converter());     return template; } 

then add connection factory , converter beans.

edit

also pay attention spring integration java dsl project, provides org.springframework.integration.dsl.jms.jms factory on matter. can find usage in jmstests: https://github.com/spring-projects/spring-integration-java-dsl/blob/master/src/test/java/org/springframework/integration/dsl/test/jms/jmstests.java


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -