PDA

View Full Version : Problem with jms-source



Jon Hegg
May 21st, 2008, 10:29 AM
Hi there,

I'm trying to get the jms-source adapter to work, but I'm banging my head against the keyboard here..

I have set it up like this :

<jms-source id="jms_source" channel="response" destination-name="sms.gateway.exit" connection-factory="connectionFactory"/>

My understanding is, that given that the connection factory works and a valid connection to the broker is established, then whenever there is a message on the sms.gateway.exit queue the jms-source adapter should read the message and convert it to a Spring Message and then send it to the "response" channel. Am I correct ?

If I then register a MessageEndpoint with the input channel "response", then the Handler in that endpoint should be called whenever there is a jms message on the queue ?

I have tried this, but it does not work. The handler does not get called.

Ant ideas ? The broker is a Sonic thing, and it returnes some sort of multi-part message. Could this be a problem ?

Mark Fisher
May 21st, 2008, 11:39 AM
Are you using Spring Integration M3 or a more recent snapshot (or SVN head) version?

Jon Hegg
May 22nd, 2008, 01:54 AM
I have tried both. Now I'm using M3. The jms-target works ok, and I can send messages to the broker, but nothing gets read from the queue

Jon Hegg
May 22nd, 2008, 06:20 AM
I found the problem. It was something wrong with the broker queues. Sorry about that.

Mark Fisher
May 22nd, 2008, 08:00 AM
No problem.

One thing to note when you do switch to M4 (to be released soon) or the SVN head version: the source and source-endpoint have been separated in configuration (so that "channel" is now configured at the <source-endpoint/> element rather than the <source/> element) as described on a reply to your other post: http://forum.springframework.org/showthread.php?t=54597