Quantcast
Channel: Spring Community Forums - JMS
Viewing all articles
Browse latest Browse all 51

Spring Integration Messages sent but not received from ActiveMQ

$
0
0
I would like to create a simple test when messages are sent to / received from FORWARD queue. Upon received message a service should be invoked.

Unfortunately, the messages are sent through
Code:

Message<?> message = MessageBuilder.withPayload(params); forwardGateway.sendPremMessage(message);
but not received. This is probably a reason why the process() from the service has not been called.

This is my config:

Code:

<!-- SENDER -->

<si:gateway id="forwardGateway"
    service-interface="com.ucware.ucpo.forward.jms.MessageGateway"
    default-request-channel="inputChannel"/>

<si:channel id="inputChannel"/>

    <!-- Subscriber to a channel -->
<int-jms:outbound-channel-adapter
channel="inputChannel"
connection-factory="connectionFactory"
destination-name="FORWARD" />


<!-- RECEIVER -->
<int:channel id="jmsInChannel"/>

 <!-- Subscriber to jmsInChannel. Used instead of inboud channel adapter -->
<int-jms:message-driven-channel-adapter id="messageDrivenAdapter"
    channel="jmsInChannel" destination-name="FORWARD" connection-factory="connectionFactory"
    concurrent-consumers="1" auto-startup="true" acknowledge="auto"/>

 // This service should be invoked but it is not
<si:service-activator id ="activator"
    input-channel="jmsInChannel"
    ref="messageService"
    method="process"/>

The service is defined as :
Code:

@MessageEndpoint
public class MessageService  {

public void process(Message<?> message ) 
}

and the gateway as :
Code:


public interface MessageGateway  {

@Gateway
public void sendPremMessage(Message<?> message);
}


Viewing all articles
Browse latest Browse all 51

Trending Articles