ISession.SendRequest Method

Solclient

ISessionSendRequest Method
version: 7.2.1.27
Send a Topic Request message. The application expects an end-to-end reply from the client that receives the request message. If the Reply-To destination in the UserProperties of the request message is not set, it defaults to the current session's ReplyTo destination. Leaving the replyTo destination unset and allowing the API to set the default replyTo destination is the easiest way to set a valid replyTo destination. When the responses are handled asynchronously (that is, the timeout parameter is zero), the application may set any replyTo destination. When the application needs to block and wait for the reply (that is, the timeout parameter is non-zero), the replyTo destination must be a topic that the application has subscribed to for Direct messages. If timeoutInMsecs is zero, this method returns immediately upon successfully accepting the request message for transmission. Any replies sent back by the destination client are delivered to the ReplyTo Destination through the message receive delegate. In such a case, the reply tag is set (IsReplyMessage == true) on the response message. It is entirely the responsibility of the application to manage asynchronous replies. Applications can use the CorrelationId message property on outgoing requests. If the timeoutInMsecs parameter is non-zero, the function waits for the amount of time specified by timeoutInMsecs milliseconds before returning with SOLCLIENT_INCOMPLETE. If the replyTo destination is set to an unsubscribed topic, or endpoint, a call to Session.SendRequest() will block until the amount of time set for the timeout parameter expires and then return SOLCLIENT_INCOMPLETE.

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
ReturnCode SendRequest(
	IMessage requestMessage,
	out IMessage replyMessage,
	int timeoutInMsecs
)
Function SendRequest ( 
	requestMessage As IMessage,
	<OutAttribute> ByRef replyMessage As IMessage,
	timeoutInMsecs As Integer
) As ReturnCode
ReturnCode SendRequest(
	IMessage^ requestMessage, 
	[OutAttribute] IMessage^% replyMessage, 
	int timeoutInMsecs
)

Parameters

requestMessage
Type: SolaceSystems.Solclient.MessagingIMessage
The request message (DeliveryMode cannot be PERSISTENT or NON_PERSISTENT).
replyMessage
Type: SolaceSystems.Solclient.MessagingIMessage
The reply message. Null reference if SOLCLIENT_INCOMPLETE is returned.
timeoutInMsecs
Type: SystemInt32
Timeout for the request to complete.

Return Value

Type: ReturnCode

SOLCLIENT_INCOMPLETE if only some of the requested operations were performed.

SOLCLIENT_OK if successful.

Exceptions
ExceptionCondition
OperationErrorException Thrown when the operation fails to complete.
ObjectDisposedException Thrown when the session is already disposed (terminal state).
FatalErrorException Thrown when an unrecoverable error occurs.
ArgumentNullException Thrown if requestMessage is null.
See Also