Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

EmsTemplate.Receive(String) Method

Receive a message synchronously from the specified destination, but only wait up to a specified time for delivery.

This method should be used carefully, since it will block the thread until the message becomes available or until the timeout value is exceeded.

[Visual Basic]
Public NotOverridable Overloads Sub Receive( _
   ByVal destinationName As String _
) _
    Implements IEmsOperations.Receive
[C#]
public Message Receive(
   string destinationName
);

Parameters

destinationName
the name of the destination to send this message to (to be resolved to an actual destination by a DestinationResolver)

Return Value

the message received by the consumer, or

null
if the timeout expires

Implements

IEmsOperations.Receive

Exceptions

Exception TypeCondition
EMSExceptionIf there is any problem accessing the EMS API

See Also

EmsTemplate Class | Spring.Messaging.Ems.Core Namespace | EmsTemplate.Receive Overload List