Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Receive-MSMQueue

Receive-MSMQueue

pscx.dll

Synopsis

PSCX Cmdlet: Receives the first message available in the queue. This call is synchronous, and blocks the current thread of execution until a message is available.

Syntax

Receive-MSMQueue [-Formatter] [-Path] [-Peek] [-TargetType] [-Timeout] [<CommonParameters>]

Receive-MSMQueue [-Name] [-Formatter] [-MachineName] [-Peek] [-Private] [-TargetType] [-Timeout] [<CommonParameters>]

Receive-MSMQueue [-Formatter] [-Peek] [-Queue] [-TargetType] [-Timeout] [<CommonParameters>]

Detailed Description

Receives the first message available in the queue. This call is synchronous, and blocks the current thread of execution and waits until either a message is available in the queue, or the time-out expires.

Parameters

-Name <String>

Aliases

None

Required?

false

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Formatter <IMessageFormatter>

The formatter used to serialize an object into or deserialize an object from the body of a message read from or written to the queue. If supplied, TargetType property will be ignored.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-MachineName <String>

The name of the computer where the Message Queuing queue is located

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Path <String>

The queue's path

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Peek <SwitchParameter>

If present, returns without removing (peeks) the first message in the queue.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Private <SwitchParameter>

The visibility of the queue

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Queue <MessageQueueInfo>

MessageQueueInfo object holding the message queue information

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-TargetType <Type>

Type of object to convert the message body to, using an XMLFormatter. If Formatter property is provided, this property will be ignored.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Timeout <TimeSpan>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type

An object deserialized from the body of the message.

Notes

Examples

-------------------------- EXAMPLE 1 --------------------------