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
but not received. This is probably a reason why the process() from the service has not been called.
This is my config:
The service is defined as :
and the gateway as :
Unfortunately, the messages are sent through
Code:
Message<?> message = MessageBuilder.withPayload(params); forwardGateway.sendPremMessage(message);
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"/>
Code:
@MessageEndpoint
public class MessageService {
public void process(Message<?> message )
}
Code:
public interface MessageGateway {
@Gateway
public void sendPremMessage(Message<?> message);
}