MSMQ URI scheme

The VersaLex MSMQ URI is for using Microsoft Message Queuing (MSMQ) queues instead of local file system files for payload sent to and received from trading partners.

The basic format of the MSMQ URI is:

msmq:DIRECT=OS:msmqQueue?param1=value1&param2=value2& param3=…

Example:

msmq:DIRECT=OS:.\private$\Inbox?createQueue=true

VersaLex only supports the DIRECT=OS queues.

MSMQ URI Parameters

Optional parameters specified in the URI include the following:
createQueue=
Specifies whether or not the queue should be created if it does not exist.
msgLabel=
Specifies the MSMQ message label. The message label is used as the filename.
msgID=
Specifies a MSMQ message ID. This parameter cannot be a wildcard or regular expression. This parameter is not typically specified in an action. It can also be used to retrieve a specific message out of the MSMQ queue.
timeoutSec=
Specifies the number of seconds to wait when reading a specific message from the queue. If not specified, the default is 5 seconds. This parameter is not typically specified.
Parameters that can be automatically added by VersaLex include the following:
msgLabel=
Specifies the MSMQ message label. The message label is used as the filename.
msgID=
Added to the URI so that a -DEL operation on a PUT can delete the specific message read.
length=
Length of the message.
arrival=
Arrival time of the message.
correlationID=
Correlation ID of the message.

MSMQ URI Sample Usages

If the host-level Inbox/Outbox are specified as MSMQ queues:
Sample commands:
PUT -DEL *
Sends all messages in the queue and deletes them after successful send.
PUT -DEL test.edi
Sends the first message with the label test.edi and deletes it after successful send.
PUT -DEL [test.edi]
Sends all messages with message label matching the regular expression [test.edi]. If there are multiple test.edi message labels in the queue, each will be sent and deleted after successful send.
GET *
Retrieves all remote files and stores them in DIRECT=OS:.\private$\Inbox.
LCOPY -DEL * C:\SomeDir\
Copies all messages from the DIRECT=OS:.\private$\Inbox to C:\SomeDir\ and deletes them from the queue.

In the case of unsolicited incoming files, the files will automatically be added as messages to the end of DIRECT=OS:.\private$\Inbox.

If the host-level Inbox/Outbox are specified as folders on the local file system as follows, then you can still use the MSMQ queue within the action commands:
Sample commands:
PUT -DEL "msmq:DIRECT=OS:.\private$\Outbox?msgLabel=*"
Sends all messages in the queue and deletes them after successful send.
PUT -DEL "msmq:DIRECT=OS:.\private$\Outbox?msgLabel=test.edi"
Sends the first message with the label test.edi and deletes it after successful send.
PUT -DEL "msmq:DIRECT=OS:.\private$\Outbox?msgLabel=[test.edi]"
Sends all messages with labels matching the regular expression [test.edi]. If there are multiple test.edi message labels in the queue, each of them will be sent and deleted after successful send.
GET * "msmq:DIRECT=OS:.\private$\Inbox"
Retrieves all remote files and stores them in DIRECT=OS:.\private$\Inbox.
LCOPY -DEL "msmq:DIRECT=OS:.\private$\Inbox" C:\SomeDir\
Copies all messages from DIRECT=OS:.\private$\Inbox to C:\SomeDir\ and deletes them from the queue.