WebLogic Messaging API Class Library |

# IMessageConsumer.Receive Method (Int64)

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 unless connection stop() is called.

IMessage Receive(
Int64 timeout
);

#### Parameters

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, or the connection is stopped

#### Exceptions

Exception Type | Condition
--- | ---
MessageException | if JMS fails to receive the next message due to some internal error.

#### See Also

IMessageConsumer Interface | WebLogic.Messaging Namespace | IMessageConsumer. Overload List