-
Notifications
You must be signed in to change notification settings - Fork 33
Jms inbound gateway
NOTE: Version 1.0.0.M1 of Sprint Integration Scala DSL provides initial and very basic support for JMS Inbond Gateway which will be enhanced in subsequence milestones.
JMS Inbound Gateway represents ListeningIntegrationComposition type. This means two things
- ListeningIntegrationComposition can only be the first element in the message flow.
- You can not send a Message to a messaging flow that begins with the ListeningIntegrationComposition, therefore send(..)* methods will not be available on such composition. Instead you will have start() and stop() method.
Continuation from JMS Inbound Gateway could be expressed using '-->' operator.
Root DSL element for JMS Inbound Gateway is jms
jms.listen(requestDestinationName = "myQueue", connectionFactory = connectionFactory) -->
As you can see from the above sample all that is needed to create a JMS Inbound Gateway is to invoke listen method providing Destination name and reference to a ConnectionFactory.
For simple testing with embedded ActiveMq broker we provide a utility class in the test package to create a ConnectionFactory
val connectionFactory = JmsDslTestUtils.localConnectionFactory
[Back to Core Messaging Patterns] (https://github.com/SpringSource/spring-integration-scala/wiki/Core-Messaging-Patterns)