Receives the next message that arrives within the specified timeout interval.

This call blocks until a message arrives, the timeout expires, or this message consumer is closed. A timeout of zero never expires, and the call blocks indefinitely.

Namespace:  Kaazing.JMS
Assembly:  Kaazing.JMS (in Kaazing.JMS.dll)

Syntax

Visual Basic
Function Receive ( _
	timeout As Long _
) As IMessage
C#
IMessage Receive(
	long timeout
)
Visual C++
IMessage^ Receive(
	long long timeout
)

Parameters

timeout
Type: System..::..Int64
the timeout value (in milliseconds)

Return Value

the next message produced for this message consumer, or null if the timeout expires or this message consumer is concurrently closed

Exceptions

ExceptionCondition
Kaazing.JMS..::..JMSExceptionif the JMS provider fails to receive the next message due to some internal error.

See Also