We send XML text messages through the definition of the CLIENT.DATA queue (transmission queue, send / return channels, etc.) from our QM_MINE queue manager, QM_CLIENT queue manager, and CLIENT.DATA queue. The message reaches the destination (CLIENT.DATA queue on the client). The problem is the ability to receive confirmation messages (an exact copy of the sent message) in the local CLIENT.DATA.ACK queue in QM_MINE as soon as the messages automatically reach CLIENT.DATA in QM_CLIENT.
I found a couple of resources in the WebSphere v7.1 info center on the queue response and message confirmation , but they didnβt help me much.
So far, I have been trying to use a response for a queue. I created a QM_MCT transfer queue on QM.OCC. Each message sent to the CLIENT.DATA queue, I set the response queue using the setJMSReplyTo () method. However, I am sure that this is not so, I am no longer missing.
A brief description of the MQ objects:
QM_MINE: CLIENT_DATA (remoteQ), QM_CLIENT (transmit Q), CLIENT_DATA_ACK (localQ)
QM_CLIENT: CLIENT_DATA (localQ), QM_MINE (transferQ),
And, the sender / receiver channels from both ends.
Download Source Package Fragements:
Client data sender (per transaction):
public class ClientServiceImpl extends JmsGatewaySupport implements ClientService { @Override public void sendClientData(String dataXML) { getJmsTemplate().convertAndSend(dataXML); } }
Message Converter:
public Message toMessage(Object o, Session session) throws JMSException, MessageConversionException { String dataXML = (String) o; TextMessage message = session.createTextMessage(); message.setJMSReplyTo(replyToQueue); message.setText(dataXML); return message; }
Note:
Current I do not have MDP or MDB for listening and consuming messages from the CLIENT_DATA queue in QM_CLIENT. I just send it from QM_MINE and it moves to QM_CLIENT using MQ. Do I need to consume messages for this to work?
I am using java, JMS, Spring and WebShere MQ v7.1 for Linux. Any additional information will be provided upon request.