A proxy that allows a CA to access its input queue.
- Source:
Extends
Methods
delayMethod(methodName, args, delayopt)
- Source:
Queues a method for future execution.
The method may be invoked multiple times when there are failures. Aborting the current request deletes the scheduled method.
The message input queue is not transactional, or checkpointed, so method execution is always "best effort", i.e., may be lost "in the network"...
There are also no hard guarantees when the method will execute. Depending on the size of the queue, it could take much longer than the requested delay.
The method will execute within its own system request. We can invoke
private methods, i.e., with prefix __ca_
, and the authorization
checks are bypassed.
WARNING: Using a client-provided method name gives full privileges to the client! Not a good idea...
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
methodName |
string | The method to be invoked. |
|
args |
Array.<jsonType> | The arguments to the method. |
|
delay |
number |
<optional> |
A minimum delay in milliseconds to start the method. If missing, the request will get queued immediately. |
queueLength() → {number}
- Source:
Gets the number of pending messages in the input queue.
Returns:
The number of messages in the input queue.
- Type
- number