Share via


QueueClient.Send Method

[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Sends the specified message to the queue.

Namespace: Microsoft.ServiceBus
Assembly: Microsoft.ServiceBus (in microsoft.servicebus.dll)

Usage

    Dim instance As QueueClient
Dim message As Message
Dim timeout As TimeSpan

instance.Send(message, timeout)

Syntax

'Declaration
Public Sub Send ( _
    message As Message, _
    timeout As TimeSpan _
)
public void Send (
    Message message,
    TimeSpan timeout
)
public:
void Send (
    Message^ message, 
    TimeSpan timeout
)
public void Send (
    Message message, 
    TimeSpan timeout
)
public function Send (
    message : Message, 
    timeout : TimeSpan
)

Parameters

  • message
    The message to send. The message must have a MessageVersion where the EnvelopeVersion is either Soap11 or Soap12.
  • timeout
    The period, in seconds, that the client wants to allow the call to block until the message is sent.

Example

queueClient.Send(Message.CreateMessage(MessageVersion.Default, "Hello", input), TimeSpan.MaxValue);

Remarks

The operation requires ‘Send’ permission on the Queue.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008, and Windows 2000

Target Platforms

See Also

Reference

QueueClient Class
QueueClient Members
Microsoft.ServiceBus Namespace