How To Use the COM+ MSMQ Message Mover Utility

Article translations Article translations
Article ID: 258260 - View products that this article applies to.
This article was previously published under Q258260
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SUMMARY

This article describes how to use the Message Mover utility that is included in COM+ 1.0.

MORE INFORMATION

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 oMessageMover
Dim lMessagesMoved

Set oMessageMover = CreateObject("QC.MessageMover")

oMessageMover.SourcePath = ".\TheSourceQueue"
oMessageMover.DestPath = ".\TheDestinationQueue"

lMessagesMoved = oMessageMover.MoveMessages

MsgBox  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.

REFERENCES

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

Properties

Article ID: 258260 - Last Review: February 28, 2014 - Revision: 1.4
APPLIES TO
  • Microsoft COM+ 1.0
  • Microsoft Message Queuing 2.0
Keywords: 
kbnosurvey kbarchive kbcomplusqc kbhowto KB258260

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com