Introduction
QueueToAction is a configurable windows service to easily retrieve messages from a MSMQ
Queue, store it's body as a file and invoke a commandline using that
file.
It is mainly used to forward Queue content to FTP, mail, printer etc. or further handling with a script.
Multiple queues
(defined via their Queue format name) can be polled and processed. All
the configurations for each of those are taken from the
registry.
QueueToAction is distributed under the GNU Public
License V3.
QueueToActionControl
QueueToActionControl is a helper GUI to define queue services with their associated actions.

You
first have to install the service, which adds it to the Windows
services collection (may also be started/stopped there and the start
type may changed from manual to automatic there). Then you can
start/stop the service.
To configure a Queue action, enter a
Queue format name in the next dropdown. All other configurations are
associated with that queue. Next define a store pathname for the file
where the content (body) of the MSMQ message will be stored. To store
the body as a binary file (e.g. for PDFs, pictures etc. sent via
Queue), tick "Msg content is binary".
Next you define the executable command string in "theExecutable". There are several built in placeholders you can use there:
<Date>...............The current date in date format
<Time>...............The current time in time format
<objMsgLabel>......The label of the current MSMQ message
<objMsgBody>...... The content (body) of the current MSMQ message
<sequentialNum>...A sequential number, starting with the launch of the service
<theStorePath>.....The store path as configured in the text box
The
Date format used for <Date> is given in Dateformat and the time
format used <Time> is given in Timeformat. Any valid VB(A) date
and timeformat can be used here.
You can also use your own settings which are defined afterwards.
- To
add a setting click on the Settings list and press "Ins". You're asked
to provide the name of the setting, then the value. To have a
setting stored encrypted in the registry, select the line with
that setting and press "E"
- To have a setting stored unencrypted, press "U".
- To edit an existing line, select the line and either press enter or double click on the line.
- To delete a setting again, select the line and press "Del".
The
button "Help on Placeholders" brings a dialog with a short cheatsheet
for the placeholders. Double click anywhere in the text to close
it again.
To save the changes you have made, click on "Save Changes".
Below Example shows the forwarding of the body of a queue to a foreign host via scp (putty scp):

Following Settings are editable only in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\RK\QueueToAction\waitTimeout
This defines the wait period between the pollings of the Queues in milliseconds.