ICacheSession.SendCacheRequest Method (Int64, ITopic, Boolean, CacheLiveDataAction, Int64, Int64)

Solclient

ICacheSessionSendCacheRequest Method (Int64, ITopic, Boolean, CacheLiveDataAction, Int64, Int64)
version: 7.2.1.27

This method is used for SolCache-RS only.

A synchronous cache request that waits for the cache response to be fulfilled according to the CacheLiveDataAction handling options.

Note: Cache requests may be flow controlled if the underlying transport is flow controlled. The transport is considered flow controlled if the library is unable to write to transport device (for example, the TCP socket is full), or if there are more than 1000 session requests (ICacheSession.SendCacheRequest(...) + ISession.SendRequest(...)) outstanding. This will cause ICacheSession.SendCacheRequest(...) to block if the session property, SendBlocking is enabled. If SendBlocking is disabled and it is not possible to write the cache request to the underlying transport, SOLCLIENT_WOULD_BLOCK is returned.

Cached messages received in response to the cache request are delivered to the application through the usual receive message callback delegate as the messages arrive. This function returns when all cache responses have been returned, and the request is either completed by live data (FULFILL), or by timeout.

Namespace: SolaceSystems.Solclient.Messaging.Cache
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
ReturnCode SendCacheRequest(
	long requestId,
	ITopic topic,
	bool subscribe,
	CacheLiveDataAction liveDataAction,
	long startSequenceId,
	long endSequenceId
)
Function SendCacheRequest ( 
	requestId As Long,
	topic As ITopic,
	subscribe As Boolean,
	liveDataAction As CacheLiveDataAction,
	startSequenceId As Long,
	endSequenceId As Long
) As ReturnCode
ReturnCode SendCacheRequest(
	long long requestId, 
	ITopic^ topic, 
	bool subscribe, 
	CacheLiveDataAction liveDataAction, 
	long long startSequenceId, 
	long long endSequenceId
)

Parameters

requestId
Type: SystemInt64
A positive Int64 that is returned to the application in the cache request response and is available in every cached message that is returned.
topic
Type: SolaceSystems.Solclient.MessagingITopic
An ITopic instance representing the topic being requested from the cache.
subscribe
Type: SystemBoolean
If true, send a subscription request to the appliance before sending a cache request to the cache.
liveDataAction
Type: SolaceSystems.Solclient.Messaging.CacheCacheLiveDataAction
One of CacheLiveDataAction
startSequenceId
Type: SystemInt64
Starting sequence number for retrieved messages. If set to 0, then start at the oldest available message If both sequence Id parameters are set to 0 then the most recent message is returned.
endSequenceId
Type: SystemInt64
End sequence number for retrieved messages, if set to 0, then all available messages starting at startSequenceId are retrieved. If both sequence Id parameters are set to 0 then the most recent message is returned.

Return Value

Type: ReturnCode
SOLCLIENT_OK if successful; SOLCLIENT_NOT_READY if the session is being connected, or is disconnected; SOLCLIENT_INCOMPLETE for the following reasons (GetLastSDKErrorInfo):
  • ProtocolError, if the cache response is malformed;
  • CacheOperationRequestTimeout, if the request timed out;
  • CacheNoData, if no data was returned in the cache response;
  • CacheSuspectData, if the cached data is suspect;
  • CacheErrorResponse, if an error was returned in the cache response.
Exceptions
ExceptionCondition
OperationErrorException Thrown when the operation fails, see ErrorInfo for specific failure reason reasons
ObjectDisposedException Thrown when the session is already disposed (terminal state).
FatalErrorException Thrown when an unrecoverable error occurs.
ArgumentNullException If any of the required arguments is null.
ArgumentOutOfRangeException If any of the arguments is out of range.
See Also