In this section:
Reference: |
Microsoft Message Queuing (MSMQ) is a messaging infrastructure and a development tool for creating distributed, loosely-coupled, messaging applications for the Windows operating system. Applications developed for Message Queuing send messages to queues. Queues are temporary storage locations used to ensure that messages reach their destination. These applications can communicate across heterogeneous networks and with computers that are offline.
Message Queuing provides guaranteed message delivery, efficient routing, security, transactional support, and priority-based messaging. Software that includes these features often is referred to in the industry as message-queuing software, store-and-forward software, or message-oriented middleware.
With Message Queuing, you can communicate across networks and with computers that are offline independent of the current state of the network and computers. System administrators can use Message Queuing to efficiently manage large, complex networks of computers and message queues.
Message Queuing provides applications with reliable communication and efficient use of network resources. Developers can focus on business logic instead of networking issues, because Message Queuing guarantees network communication.
The iWay Adapter for MSMQ provides bidirectional functionality and transactional support. The adapter facilitates the exchange of messages between Microsoft Message Queues and other enterprise systems.
The iWay Adapter for MSMQ enables Service Manager to read messages arriving on a named queue and route these messages to either another queue or to a non-MSMQ destination. Similarly, messages received through other Service Manager listeners can be directed to an MSMQ queue. During the message flow, the standard document analysis, validation, transformation, and business logic capabilities offered by the server can be applied to the document.
The following table lists and describes the MSMQ listener properties. For instructions on creating a listener, see How to Create a Listener.
Property |
Property Description |
---|---|
Request Queue (required) |
Queue on which request documents are received. The name is case-sensitive and conforms to the following format Host\queuetype$\qName where:
|
Default Reply |
Default queue where responses are directed unless specified otherwise, and where the message is routed. Conforms to the following format Host\queuetype$\qName where:
|
Filter by Msg Id |
If values are entered, Service Manager accepts only messages with this message header value. |
Filter by Correlation Id |
If values are entered, Service Manager accepts only messages with this message header value. |
Message Priority |
Microsoft defines eight levels of message priority with values 0 through 7, where 0 is the lowest and 7 is the highest. Zero through three are considered normal settings, and four through seven, expedited. The Message Priority field is the default priority value set in the message header. |
Transactional |
If set to true, the queue will be treated as transactional. |
Pending Queue |
Name of the queue where Service Manager keeps requests that have not been processed (due to the back-end data server not being available). |
Duration |
The maximum time, in seconds, that a document can remain in the Retry pending queue. |
Retry |
The interval between retrying pending requests. |
User Headers |
The include user attributes in RFH2 header. |
Whitespace Normalization |
Specifies how the parser treats whitespace in Element content. Choose preserve to turn off all normalization as prescribed by the XML Specification. Choose condense to remove extra whitespace in pretty printed documents and for compatibility with earlier versions. |
Accepts non-XML (flat) only |
Select true if non-XML input is expected. If enabled, XML input still can be passed to the listener. Preparsers do not run. |
Optimize Favoring |
For small documents, select performance. For large volumes of data, select memory. |
Multithreading |
The number of worker threads. Equivalent to the number of document requests the engine can handle in parallel. Setting this to a value greater than 1 enables the listener to handle a second request while an earlier request is processed. The total throughput of a system can be affected by the number of threads operating. Default = 1 Max value = 99 |
Execution Time Limit |
The maximum time a request can take to complete. A request that takes longer to complete terminates. Prevents runaway requests. |
Polling Interval |
The maximum wait interval between checks of the MSM queues. The higher the value, the longer the interval, and the fewer system resources used. The side effect of a high value is that the worker thread cannot respond to a stop command. Default = 2.0 |
Default Java File Encoding |
The default encoding if incoming message is not self-declaring (that is, XML). |
Agent Precedence |
Sets the order for selecting the Execution Agent. The system selects the agent(s) to use to process the document by searching through the configuration dictionary. Usually, it looks for a document entry in the configuration and when a match is found, the agent specified in that document entry is selected. If a matching document entry is not found or no agent is specified, the engine looks in the input protocol configuration (listener). For the processing agent to be taken directly from the listener (thus ignoring the document entry), select Listener Overrides Document. An alternative is Document Overrides Listener. <document> overrides <listener> is the default value. |
Always reply to listener default |
If set to true, the default reply definition is used in addition to defined destinations. |
Error Documents treated normally |
If set to true, error documents are processed by configured preemitters. |
Listener is Transaction Manager |
If set to true, agents run in a local transaction. Agents can roll back uncompleted transactions. |
Record in Activity Log(s) |
If set to true, activity on this channel will be recorded in the activity logs. If set to false, the activity will not be recorded. |
The following table lists and describes the special registers (SREGs) available on the MSMQ listener.
Name |
Level |
Type |
Description |
---|---|---|---|
destination |
System |
String |
The name of the destination queue. |
msgsize |
Document |
Integer |
The physical length of the message payload. |
msmqlabel |
Document |
String |
The message label of the received message. |
name |
System |
String |
The assigned name of the listener. |
priority |
Document |
Integer |
The priority of the incoming message. |
protocol |
System |
String |
The protocol on which this message was received. |
source |
System |
String |
The queue on which the message was received. |
tid |
Document |
String |
Unique transaction ID. |
You are receiving documents on a private queue, named Test1, not listed in Active Directory, located on a development machine named Dev1. You would like incoming messages with a specific message header value directed to another queue on a second development box called Dev2. You also want Service Manager to keep requests that failed due to a back end data server not being available. Specify the values as follows:
To route an output document or error message to a protocol other than that of the listener, an emitter must be configured. An emitter is used to send documents outbound either on the same protocol that the document arrived on or alternatively, on a cross protocol.
You can return a processed document to one or more alternate destinations. By default, an output document is returned using the same protocol on which it was received. For example, an application may send input over TCP but want to route the output to MSMQ. In such a case, an emitter must be configured.
Note: Configuring an MSMQ emitter is not required if the emitter protocol used in the outlet of the channel is the same as the listener protocol used in the inlet of the channel. For more information on inlets and outlets, see Defining an Inlet and Defining an Outlet.
The following table lists and describes the MSMQ emitter properties. For instructions on creating an emitter, see How to Create an Emitter.
Property |
Description |
---|---|
Destination (required) |
Queue where the message is routed, in the format of Host\queuetype\qName where:
|
Set Reply Correlation Id (required) |
If set to a value, this value sets the correlation ID of the response. |
Transactional |
If set to true, the queue will be treated as transactional. |
Delivery Method |
Select Express Delivery or Recoverable Delivery. Express Delivery does not guarantee arrival, but processing is faster. |
Message Priority |
Microsoft defines eight levels of message priority with values 0 through 7, where 0 is the lowest and 7 is the highest. Zero through three are considered normal settings, and four through seven, expedited. The Message Priority field is the default priority value set in the message header. |
Message Label |
Label is roughly equivalent to email subject or JMSQ Topic. |
You want to route documents or error messages to a protocol other than a listener. You must configure an emitter to do this. Specify the values as follows:
iWay Software |