Skip to content

Instantly share code, notes, and snippets.

@knalli
Created February 16, 2014 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knalli/9038402 to your computer and use it in GitHub Desktop.
Save knalli/9038402 to your computer and use it in GitHub Desktop.
<beans>
<int-amqp:outbound-gateway
amqp-template="amqpTemplate"
request-channel="requestChannel"
reply-channel="resultChannel"
routing-key="queue"/>
</beans>
<beans>
<int-amqp:outbound-gateway
amqp-template="amqpTemplate"
request-channel="requestChannelJson"
reply-channel="resultChannelJson"
routing-key="queue"/>
</beans>
<int:chain input-channel="requestChannel" output-channel="requestChannelJson">
<int:object-to-json-transformer/>
</int:chain>
<int:chain input-channel="resultChannelJson" output-channel="resultChannel">
<int:json-to-object-transformer type="your.package.to.Response"/>
</int:chain>
<beans>
<int:gateway service-interface="your.package.to.MyGateway"
default-request-channel="requestChannel"
default-reply-channel="resultChannel"
error-channel="errorChannel"/>
</beans>
@Service
public interface MyGateway {
@Gateway
Response handle(@Payload Request request);
}
@Service
public interface MyGateway {
@Gateway
Future<Response> handle(@Payload Request request);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment