Page 1
Page 2
Page 3
Laying the Foundation for MSMQ
Enterprise solutions are becoming more
and more distributed. With the evolution of the Pocket PC
as an integral part of many of these solutions, the necessity
for managing intermittently connected processes is becoming
critical. Even a traditional, networked environment can
benefit from the techniques used to manage a network connection
that may not always be present.
What You Need
MSMQ Component - developed by Ken Rabold
in his article "Programming
MSMQ on the Pocket PC"
You can download
the MSMQ component from http://www.bsquare.com/eBooks/ProgMSMQ.
To install the CAB files, run the instcab.bat file
located in the cab subdirectory. When completed,
you will need to reset your device, since the component
functions as a driver and needs to be loaded before use.
A more complete description of the setup process is included
in the article mentioned above as well as in Ken's
eBook "Programming MSMQ on the PocketPC".
If you wish to try out the source code
for the article, you will also want to download the BMP
files to the \My Documents\MSMQConsole directory
on your Pocket PC. Alternately, you can copy the files to
a location of your choice with a change to the corresponding
constant declarations at the top of the Console form code.
These images are used by the image list control, to supply
images to the tree view, list view and menu bar controls
in the application.
What can MSMQ do for me?
Microsoft Message Queue (MSMQ) allows
for the distribution of information between devices on a
network regardless of the degree of connectivity between
them. Frequently disconnected devices can communicate through
messages that are stored locally and are relayed as soon
as a network connection becomes available. Applications
built around MSMQ are designed to opportunistically react
to the presence of a network and to distribute messages
from device to device. It requires only an intermittent
connection to make all of this communication possible.
MSMQ Basics
Let's start by going over the basics
of MSMQ and then take you through the development of a full-fledged
application that mimics much of the functionality of the
MSMQ snap-in for the Microsoft Management Console (MMC).
To get an idea what our working model is, I have included
a screen shot of the MMC application:

The Pocket PC version will include most
of MMC functionality plus some additional features for learning
how to work with messages. What we end up with after working
through the development of the MSMQ Console application
is:

The most basic structure to MSMQ,
and where it gets its name, is an object called a queue.
A queue functions in much the same way as a mailbox, where
letters accumulate and can be retrieved for reading. The
communication between these queues is done through messages,
which can be as simple as a string of text (letter) or as
sophisticated as a persistable object (a package), such
as an XML document or an ADO recordset. Currently, the Pocket
PC version of MSMQ is somewhat limited in what it is allowed
to transmit, but it can still mimic many of the desktop
features with a little help.
Next Page