How To Use the COM+ MSMQ Message Mover Utility

This article was previously published under Q258260
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes how to use the Message Mover utility that is included in COM+ 1.0.
The Message Mover object is a utility that moves MSMQ messages from a source queue to a destination queue.

If the messages are generated by COM+ Queued Components calls, Message Mover preserves the original caller's security identifier as it moves messages between queues.

If both queues are transacted, the entire operation is done transactionally. If either the source or destination queues are not transacted, the operation does not run under a transaction. An unexpected failure (such as a crash) and restart of a nontransactional move could duplicate the message being moved at the time of the failure.

To use the Message Mover utility from Microsoft Visual Basic, add a reference to the "COM+ Services Type Library." You can also use this automation object a script written in Visual Basic Scripting Edition, JavaScript, ASP pages, and C++ clients.

The following sample code shows how to create the object, set the required properties, and then initiate the transfer:
Dim oMessageMoverDim lMessagesMovedSet oMessageMover = CreateObject("QC.MessageMover")oMessageMover.SourcePath = ".\TheSourceQueue"oMessageMover.DestPath = ".\TheDestinationQueue"lMessagesMoved = oMessageMover.MoveMessagesMsgBox  lMessagesMoved & " messages moved from '" &  oMessageMover.SourcePath &  "' to '" & oMessageMover.DestPath & "'."				
Note that the SourcePath and DestinationPath properties require MSMQ path names. To move messages from or to private queues, prefix the queue name in the path with Private$\. Please read the documentation in the "References" section for detailed information about the path name format.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
253669 INFO: What's New with COM+ 1.0
moving mover transfer sending router MSMQ MQ MSQ MMQ message QC MQC utility object tool class complus plus com

Article ID: 258260 - Last Review: 02/28/2014 04:18:24 - Revision: 1.4

Microsoft COM+ 1.0, Microsoft Message Queuing 2.0

  • kbnosurvey kbarchive kbcomplusqc kbhowto KB258260