Table of Contents

Class MessageModuleClient

Namespace
Scaleout.Modules.Client
Assembly
Scaleout.Modules.Client.dll

Client for sending messages to message module objects.

public class MessageModuleClient
Inheritance
MessageModuleClient
Derived
Inherited Members

Constructors

MessageModuleClient(Cache)

Protected constructor for use by derived (typed) MessageModuleClient class, where the caller supplies an existing Scaleout.Client.Cache instance.

protected MessageModuleClient(Cache cache)

Parameters

cache Cache

Cache instance

MessageModuleClient(string, GridConnection)

Constructs a MessageModuleClient for the specified module name and grid connection.

public MessageModuleClient(string moduleName, GridConnection gridConnection)

Parameters

moduleName string

Name of the module to send messages to.

gridConnection GridConnection

Scaleout.Client GridConnection used to connect to the ScaleOut service.

Fields

_cache

protected Cache _cache

Field Value

Cache

Methods

SendAsync<TSossObject>(string, byte[], TimeSpan?)

protected Task SendAsync<TSossObject>(string objectId, byte[] message, TimeSpan? timeout = null)

Parameters

objectId string
message byte[]
timeout TimeSpan?

Returns

Task

Type Parameters

TSossObject

SendMessageAsync(string, byte[], TimeSpan?)

Sends a message to the specified object in the message module.

public virtual Task SendMessageAsync(string objectId, byte[] message, TimeSpan? timeout = null)

Parameters

objectId string

ID of the object to send a message to.

message byte[]

Message payload.

timeout TimeSpan?

The amount of time allowed for this operation. After the expires, the operation will be canceled. You may specify null or Zero if you want the operation to continue no matter how long it takes. If the timeout elapses, a Scaleout.Client.TimeoutException or OperationCanceledException will be thrown (depending on whether the timeout occurred in the service or in the client process).

Returns

Task

The task object representing the asynchronous operation.

Exceptions

NotReadyException

The ScaleOut service is not yet ready to perform this operation, typically because there was no application registered to handle events for the specified moduleName.

TimeoutException

The operation timed out in the server and the timeout elapsed.

OperationCanceledException

The operation timed out, typically because too many pending requests accumulated in the client and the timeout elapsed.

ScaleoutModuleException

An unhandled exception occurred in the module while processing the message.