The MQ listener (formally MQSeries adapter), can be used as an alternative interface to the WebSphere Commerce system and functionality. The MQ listener not only processes inbound requests, but can provide a reply to the request. Any command that formulates a response can be configured to provide a response through the MQ listener.
When an inbound message is received by the WebSphere MQ listener it is mapped to a command and that command is called with the parameters specified in the inbound message. If a response is to be generated from this inbound request, an entry in the VIEWREG table is needed. If a response is generated by the command, that response is placed on the outbound queue of the Parallel or Serial connector depending on the connector which receives the inbound request.
If an error with the inbound request occurs, the message generating the error is placed on the error queue. To generate an error response to the outbound queue, another entry is needed in the VIEWREG table to map the error response using the proper device format.
To setup the MQ listener component for providing responses for inbound messages, do the following:
- Verify that the instance_name.xml file includes an Outbound
Queue for Inbound Parallel and Serial Connector by ensuring that syntax similar
to the following is included for the Inbound Parallel Connector:
<EditableProperty Admin="outQueue" editable="Yes" name="setOutboundQueue" display="false" value="JMSParallelOutboundQueue" />
- Using JMSAdmin, define the JMS name for the serial and parallel outbound queues. For more information on configuring JMS using JMSAdmin, refer to the WebSphere Commerce Additional Software Guide.
- Add an entry in the VIEWREG table to define the response needed for the
inbound request. This step is required both for existing WebSphere Commerce
commands and for new commands. Use the following values:
- VIEWNAME
- The same value as for regular HTTP responses
- INTERFACENAME
com.ibm.commerce.messaging.viewcommands.MessagingViewCommand
- CLASSNAME
com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl
- PROPERTIES
docname=JSP filename
- DEVICEFMT_ID
- -20000 for XML inbound messages
- -30000 for legacy inbound messages
- Add -5 for new inbound messages