[TIBCO.EMS.UFOCLIENT .NET client library 5.1 documentation]
Assembly: TIBCO.EMS.UFO (in TIBCO.EMS.UFO.dll)
Receives the next message that arrives within the specified timeout interval.
Namespace:
TIBCO.EMS.UFOAssembly: TIBCO.EMS.UFO (in TIBCO.EMS.UFO.dll)
Syntax
public Message Receive( long timeout ) |
Public Function Receive ( _ timeout As Long _ ) As Message |
public: Message^ Receive( long long timeout ) |
Parameters
- timeout
- Type: System..::.Int64
Wait no longer than this interval (in milliseconds) for a message to arrive. Zero is a special value, which specifies no timeout (block indefinitely).
Return Value
the next message produced for this message consumer, or null if this message consumer is concurrently closed
Remarks
This method consumes the next message from the destination (synchronously). When the destination does not have any messages ready, this method blocks:
- If a message arrives at the destination, this call immediately returns that message.
- If the (non-zero) timeout elapses before a message arrives, this call returns null.
- If another thread closes the consumer, this call returns null.
When calling receive within a transaction, the consumer retains the message until transaction commits.