Skip to content
This repository was archived by the owner on Jul 9, 2022. It is now read-only.

Jms inbound gateway

olegz edited this page Mar 4, 2012 · 8 revisions

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

  1. ListeningIntegrationComposition can only be the first element in the message flow.
  2. 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.

JMS Inbound Gateway

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)

Clone this wiki locally