Class Reference
IRIS for UNIX 2019.4
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%Net] >  [MQRecv]
Private  Storage   

class %Net.MQRecv extends %Net.abstractMQ

The MQRecv class is used to get a message from a queue. 


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 2


ApplIdentityData Channel CharSetId Connection
Context CorrelationId MQCloseQID MQCommitID
MQConnectID MQDeleteID MQDisconnID MQErrLogID
MQGetID MQGetLastErrID MQGetStreamID MQMsgDescID
MQPutID MQPutStreamID MQSetChannelID MQSetUserPassID
MQSubscribeID MessageId Password PutApplType
QMBehavior QMgr QName ReplyQMgrName
ReplyQName SSLCipherSpec SelectCorrelationId SelectMessageId
Syncpoint Transport Username mDesc
mDllid qtype

%%OIDGet %AddToSaveSet %ApplIdentityData %Backout
%BindExport %BuildObjectGraph %CharSet %ClassIsLatestVersion
%ClassName %Close %Commit %Connect
%ConstructClone %CorId %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %ErrLog %Extends %Get
%GetLastError %GetParameter %GetStream %IncrementCount
%Init %IsA %IsModified %MsgId
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %PutApplType %RemoveFromSaveSet %ReplyQMgrName
%ReplyQName %SerializeObject %SetCharSet %SetModified
%Syncpoint %ValidateObject



• property SelectCorrelationId as %String;
Message Selection Options: Correlation Id
• property SelectMessageId as %String;
Message Selection Options: Message Id
• property qtype as %Integer [ InitialExpression = 0 ];
MQ type


• method %Get(ByRef Message As %String, timeout As %Integer = 0) as %Boolean
The %Get method reads from the queue specified in the %Init call.  The method takes one argument, the timeout in milliseconds.  The timeout refers to the time required to contact the server.  %Get is non-blocking (returns immediately whether or not there is a message on the queue).

If  %Get gives a return code of 0, there was a failure or timeout.  The return string is empty.  If  %Get returns 1, the call was successful.  The return string is empty or contains a message depending on what the queue contained.

• method %GetStream(stream As %Stream, timeout As %Integer = 0) as %Boolean
Identical to %Get except the queue message, if any, is returned in a file character stream object.

Data is read from the queue into a memory buffer, and the entire message written to the file of the character stream object.

Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.