MessageQueueTask Class

Definition

Contains the methods and properties used by the Message Queue task. This class cannot be inherited.

public ref class MessageQueueTask sealed : Microsoft::SqlServer::Dts::Runtime::Task, Microsoft::SqlServer::Dts::Runtime::IDTSBreakpointSite, Microsoft::SqlServer::Dts::Runtime::IDTSComponentPersist, Microsoft::SqlServer::Dts::Tasks::MessageQueueTask::IMessageQueueTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.messagequeuetask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MSMQTaskMessages), SamplesTag="SsisMessageQueueTask", TaskContact="Message Queue Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MessageQueueTaskUI, Microsoft.SqlServer.MSMQTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
public sealed class MessageQueueTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.IMessageQueueTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.messagequeuetask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MSMQTaskMessages), SamplesTag="SsisMessageQueueTask", TaskContact="Message Queue Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MessageQueueTaskUI, Microsoft.SqlServer.MSMQTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
public sealed class MessageQueueTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.IMessageQueueTask
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.messagequeuetask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MSMQTaskMessages), SamplesTag="SsisMessageQueueTask", TaskContact="Message Queue Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MessageQueueTaskUI, Microsoft.SqlServer.MSMQTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
public sealed class MessageQueueTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSBreakpointSite, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.IMessageQueueTask
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.messagequeuetask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MSMQTaskMessages), SamplesTag="SsisMessageQueueTask", TaskContact="Message Queue Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MessageQueueTaskUI, Microsoft.SqlServer.MSMQTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
type MessageQueueTask = class
    inherit Task
    interface IDTSComponentPersist
    interface IMessageQueueTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.messagequeuetask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MSMQTaskMessages), SamplesTag="SsisMessageQueueTask", TaskContact="Message Queue Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MessageQueueTaskUI, Microsoft.SqlServer.MSMQTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
type MessageQueueTask = class
    inherit Task
    interface IDTSComponentPersist
    interface IMessageQueueTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.messagequeuetask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MSMQTaskMessages), SamplesTag="SsisMessageQueueTask", TaskContact="Message Queue Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.MessageQueueTask.MessageQueueTaskUI, Microsoft.SqlServer.MSMQTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
type MessageQueueTask = class
    inherit Task
    interface IDTSComponentPersist
    interface IMessageQueueTask
    interface IDTSBreakpointSite
    interface IDTSSuspend
Public NotInheritable Class MessageQueueTask
Inherits Task
Implements IDTSBreakpointSite, IDTSComponentPersist, IMessageQueueTask
Inheritance
MessageQueueTask
Attributes
Implements

Remarks

The Message Queue task class allows an object to send and receive messages to or from a queue of Message Queuing (also known as MSMQ). Participation in distributed transactions is allowed when running the Microsoft Distributed Transaction Coordinator (MSDTC). A single instance of a Message Queue task either sends one message to a specified queue or receives a single message from a specified queue, and also waits, if necessary, for the message to arrive. The following types of messages can be sent:

  • A string message, which is supplied as the value of a property.

  • A data file message, which is generated from the contents of a specified data file.

  • A variables message, which is generated from the names and values of one or more SQL Server Integration Services variables.

The enumeration MQMessageType determines which message format is used by a specific Message Queue task.

For more information, see Message Queue Task.

For the MessageQueueTask to work in either the API or in SSIS Designer, you must install SQL Server Integration Services. This feature will not work if only SQL Server Data Tools (SSDT) is installed.

Important

When configuring the Message Queue task to send messages, you can use one of the encryption algorithms that are currently supported by the Message Queuing, RC2 and RC4, to encrypt the message. Both of these encryption algorithms are now considered cryptographically weak compared to newer algorithms, which Message Queuing does not yet support. Therefore, you should consider your cryptography needs carefully when sending messages using the Message Queue task.

Constructors

MessageQueueTask()

Initializes a new instance of the MessageQueueTask class.

Properties

CurrentExecutingPackageID

Gets or sets the ID of the current executing package.

DataFileOverWritable

Gets or sets a Boolean that indicates whether the data file message can overwrite an existing data file.

DebugMode

Gets or sets a Boolean that indicates whether the object is in debug mode, and whether it should raise the OnBreakpointHit(IDTSBreakpointSite, BreakpointTarget) event while running.

DTSMessageLineageID

Gets or sets the message lineage identifier.

DTSMessagePackageID

Gets or sets the identifier of the package that is the source of the message.

DTSMessageVersionID

Gets or sets the version of the message.

EncryptionAlgo

Gets or sets the name of the encryption algorithm used to encrypt the message body of a private message.

ErrorIfMessageTimeOut

Gets or sets a Boolean specifying whether the task fails when the message times out.

ExecutionValue

Returns a user-defined object. This field is read-only.

(Inherited from Task)
MessageDataFile

Gets or sets the data file name used when the MessageType is set to DTSMQMessageType_DataFile.

MessageString

Gets or sets the message to use when the MessageType is set to DTSMQMessageType_String.

MessageType

Gets or sets a value that indicates the type of message being sent when the TaskType is DTSMQType_Sender.

MessageVariables

Gets or sets the variables list when the MQMessageType enumeration is set to DTSMQMessageType_Variables.

MsmqConnection

Gets or sets the name of the connection for the MSMQ task.

OperationDescription

Gets or sets the description of the operation.

ReceiveMessageTimeOut

Gets or sets a value that specifies the number of seconds before a received message times out.

ReceiveMessageType

Gets or sets an MQMessageType value that indicates the message type to receive.

ReceiveVariableMessage

Gets or sets the name of the variable in which to store the message.

RemoveFromQueue

Gets or sets a Boolean that specifies whether the message should be removed from the queue.

SaveDataFileName

Gets or sets the name of the file to which an incoming Data File message is saved.

StringCompareType

A value that specifies the string comparison method for a String message type when the TaskType is DTSMQType_Receiver.

StringCompareValue

Gets or sets the String to which a string message is compared to when the TaskType is DTSMQType_Receiver.

StringMessageToVariableName

Gets or sets the name of the variable to which the message contents are saved.

SuspendRequired

Gets or sets a Boolean that indicates if the task should suspend when it encounters a breakpoint. This value is set by the runtime engine for tasks and containers when a breakpoint is encountered.

TargetServerVersion (Inherited from Task)
TaskType

Gets or sets a value that indicates whether the message task is sending or receiving.

Use2000Format

Gets or sets a Boolean indicating that the message uses SQL Server 2000 format.

UseEncryption

Gets or sets a Boolean indicating whether the message uses encryption.

Version

*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.

(Inherited from Task)

Methods

AcceptBreakpointManager(BreakpointManager)

Passes a BreakpointManager to a task. This method is called by the runtime and is not used in code.

CanUpdate(String)

*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML.

(Inherited from Task)
Equals(Object)

Determines whether two object instances are equal.

(Inherited from DtsObject)
Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

Runs the task.

GetConnectionID(Connections, String)

Gets a String containing the ID of the connection.

(Inherited from Task)
GetConnectionName(Connections, String)

Gets a String containing the name of the connection.

(Inherited from Task)
GetHashCode()

Returns the hash code for this instance.

(Inherited from DtsObject)
InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

Initializes the properties associated with the task. This method is called by the runtime and is not used in code.

LoadFromXML(XmlElement, IDTSInfoEvents)

This method is not callable by your application code. To load a package saved in XML format (with the.xml file name extension), use the LoadPackage(String, IDTSEvents) method.

ResumeExecution()

Resumes execution of the task after pausing. Execution of the task or container is resumed by the runtime engine.

SaveToXML(XmlDocument, IDTSInfoEvents)

This method is not callable by your application code. To save a package as .xml, use the SaveToXml(String, Package, IDTSEvents) method.

SuspendExecution()

Indicates that the executable needs to suspend. This method is called by the runtime engine.

Update(String)

*** Member deprecated; see Remarks. ***   This method updates the old package XML with the new package XML if CanUpdate(String) is set to true.

(Inherited from Task)
Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

Verifies that the task is properly configured.

Applies to