Changes to Message Queuing COM components in Message Queuing 2.0 (247780)



The information in this article applies to:

  • Microsoft Message Queuing 2.0

This article was previously published under Q247780

SUMMARY

The multitude of improvements, changes, and additional properties added to the Microsoft Message Queuing Component Object Model (COM) components in Message Queuing Version 2.0 (which ships with Windows 2000) are delineated in this article.

MORE INFORMATION

Following is a list of support options in Message Queuing 2.0 for applications that initialize their threads as multi-threaded apartment (MTA). This means the application caused CoInitializeEx(NULL, COINIT_MULTITHREADED) on the creating thread:
  • Improved performance using the Message Queuing COM objects. Object methods now execute on the caller's thread. In Microsoft Message Queue Server 1.0, there is a thread switch from Multithreaded Apartment (MTA) to COM's Single Threaded Apartment (STA), and a bottleneck in COM's STA (which previously served all the Message Queuing COM objects).
  • Improved availability. In Message Queue Server 1.0, if a blocking call is made on one of your objects, for example, q.Receive with a large timeout, then all the other calls from any MTA thread are blocked until that call is finished. This blockage occurs because all of the calls need to execute on COM's STA. In Message Queuing 2.0, this blockage is no longer the case because object calls are executed on the caller's thread.
  • Applications that share Message Queuing objects between threads perform faster. In Message Queue Server 1.0, calls to the objects from a thread other than the thread that created the object are marshaled through a thread switch to the creator thread in order to perform any tasks. In Message Queuing 2.0, the caller thread directly manipulates the object. An example of such an application is an IIS application that needs to share an opened queue instance between several Active Server Pages (ASP) threads.
In Message Queuing 2.0, it is possible to attach to an external transaction using the MSMQTransaction.InitNew() method whereas in Message Queue Server 1.0, this is not possible.

New Properties for the MSMQMessage Object

  • The SenderVersion property of the MSMQMessage object specifies which version of Message Queuing was used to send a message.
  • The Extension property of the MSMQMessage object specifies additional application-defined information that is associated with the message.
  • The ConnectorTypeGuid property of the MSMQMessage object indicates that some message properties typically set by Message Queuing were set by the sending application.
  • The TransactionStatusQueueInfo property of the MSMQMessage object specifies the transaction status queue on the source computer. It is used only by connector applications when retrieving transactional messages sent to a foreign queue.
  • The DestinationSymmetricKey property of the MSMQMessage object specifies the symmetric key used to encrypt messages.
  • The Signature property of the MSMQMessage object specifies the Message Queue Server 1.0 signature used to authenticate the message.
  • The AuthenticationProviderType property of the MSMQMessage object specifies the type of cryptographic provider used to generate the digital signature of the message.
  • The AuthenticationProviderName property of the MSMQMessage object specifies the name of the cryptographic provider used to generate the digital signature of the message.
  • The MsgClass property of the MSMQMessage object indicates the message type. A message can be a normal Message QueuingMessage Queuingmessage, a positive or negative (arrival and read) acknowledgment message, or a report message. This property is typically set by MSMQ.
  • The TransactionId property indicates which transaction sent the message.
  • The IsFirstInTransaction property of the MSMQMessage object indicates whether the message was the first message sent in its transaction.
  • The IsLastInTransaction property of the MSMQMessage object indicates whether the message was the last message sent in its transaction.
  • The ReceivedAuthenticationLevel property of the MSMQMessage object indicates whether the sending application requested authentication and indicates what type of signature was used.
A new property for for the MSMQQueueInfo object is MSMQQueueInfo.PathnameDNS. The PathNameDNS property indicates the DNS pathname of the queue. Message Queuing generates the DNS path name whenever this property is specified.

REFERENCES

Microsoft Windows 2000 Platform SDK Help File

Modification Type:MajorLast Reviewed:4/20/2005
Keywords:kbinfo KB247780