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
Post a Comment