Apama API Reference for .NET  9.10.0.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Apama.Engine.Client.IMessagingClient Interface Reference

This interface is for all operations that can be performed on an Apama component related to sending and receiving messages (e.g. events, injections, deletions, etc). More...

Inherits Apama.Net.Client.IBaseClient.

Inherited by Apama.Engine.Client.IEngineClient.

Public Member Functions

IConsumerOperations AddConsumer (string uniqueName, params string[] channels)
 Add a new uniquely-named consumer that listens on a specified set of channels. More...
 
IConsumerOperations AddConsumer (string uniqueName, string[] channels, bool disconnectSlow)
 Add a new uniquely-named consumer that listens on a specified set of channels. More...
 
IConsumerOperations AddConsumer (string uniqueName, string[] channels, bool disconnectSlow, bool async)
 Add a new uniquely-named consumer that listens on a specified set of channels. More...
 
void CancelDeleteFileRead ()
 The purpose of the CancelFileRead property is to provide a mechanism to cleanly terminate the processing of events from file, when the DeleteNamesFromFile() or KillNamesFromFile() method is in progress. When CancelFileRead is set to true, the Name deleting loop will terminate at the next iteration. More...
 
void CancelInjectFileRead ()
 The purpose of the CancelInjectFileRead property is to provide a mechanism to cleanly terminate the processing of MonitorScripts from file, when the InjectMonitorScriptFromFile() method is in progress. When CancelInjectFileRead is set to true, the MonitorScript injecting loop will terminate at the next iteration. More...
 
void CancelSendFileRead ()
 The purpose of the CancelSendFileRead property is to provide a mechanism to cleanly terminate the processing of events from file, when the IMessagingClient.SendEventsFromFile(string[], int) method is in progress. When CancelFileRead is set to true, the event sending loop will terminate at the next iteration. More...
 
void ConnectInBackground ()
 Requests that the client begins to establish a connection automatically in the background. More...
 
void DeleteAll ()
 Deletes everything from the engine. More...
 
void DeleteName (string name, bool force)
 Delete a name from the engine. If a connection is not yet established, this method will request a connection. More...
 
void DeleteNames (string[] names, bool force)
 Delete a number of names. If a connection is not yet established, this method will request a connection. More...
 
void DeleteNamesFromFile (string[] fileNames, bool force)
 Delete a number of names from a file or stdin. If a connection is not yet established, this method will request a connection. More...
 
void DeleteNamesFromFile (string[] fileNames, bool force, bool utf8)
 Delete a number of names from a file or stdin. If a connection is not yet established, this method will request a connection. More...
 
void FlushEvents ()
 Wait for any outstanding events from previous Apama.Engine.EngineManagement.SendEvents(Apama.Event.Event[]) or SendEvents(bool, Apama.Event.Event[]) (where the Boolean is true) calls into the Engine, and then return. More...
 
IConsumerOperations[] GetAllConsumers ()
 Get all existing uniquely-named consumers. More...
 
IConsumerOperations GetConsumer (string uniqueName)
 Get an existing uniquely-named consumer. More...
 
void InjectCDP (byte[] cdpBytes, String filename)
 Send the bytes of a CDP (Correlator Deployment Package) to the engine. If a connection is not yet established, this method will request a connection. More...
 
void InjectCDPsFromFile (params string[] fileNames)
 Inject a number of CDP (Correlator Deployment Package)(s) from a file or stdin. If a connection is not yet established, this method will request a connection. More...
 
void InjectJavaApplication (byte[] jarBytes)
 Send the bytes of a Java (JMon) Application jar to the engine. If a connection is not yet established, this method will request a connection. More...
 
void InjectJavaApplicationsFromFile (params string[] fileNames)
 Inject a number of Java (JMon) Application(s) from a file or stdin. If a connection is not yet established, this method will request a connection. More...
 
void InjectMonitorScript (MonitorScript script)
 Send MonitorScript text to the engine (using the obsolete MonitorScript object) without blocking concurrent calls to operations on this bean instance. More...
 
void InjectMonitorScript (string eplString)
 Send MonitorScript text to the engine without blocking concurrent calls to operations on this bean instance. More...
 
void InjectMonitorScript (string eplString, string fileName)
 Send MonitorScript text to the engine without blocking concurrent calls to operations on this bean instance. More...
 
void InjectMonitorScriptFromFile (params string[] fileNames)
 Inject a number of monitors from a file or stdin. If a connection is not yet established, this method will request a connection. More...
 
void InjectMonitorScriptFromFile (string[] fileNames, bool utf8)
 Inject a number of monitors from a file or stdin. If a connection is not yet established, this method will request a connection. More...
 
void RemoveAllConsumers ()
 Remove and disconnect all existing uniquely-named consumers. If a consumer is asynchronous, it may still be called after this method has returned; otherwise, the RemoveConsumer will wait for any calls into the consumer to complete. More...
 
void RemoveConsumer (string uniqueName)
 Remove and disconnect any existing uniquely-named consumer. If a consumer is asynchronous, it may still be called after this method has returned; otherwise, the RemoveConsumer will wait for any calls into the consumer to complete. More...
 
void SendEvents (params Apama.Event.Event[] events)
 Send an array of Event objects to the Engine, performing auto-batching. More...
 
void SendEvents (bool autoBatch, params Apama.Event.Event[] events)
 Send an array of Event objects to the Engine, optionally not performing auto-batching. More...
 
void SendEventsFromFile (string[] fileNames, int loopCount)
 Send a number of events from a file or stdin. More...
 
void SendEventsFromFile (string[] fileNames, int loopCount, bool utf8)
 Send a number of events from a file or stdin. More...
 
void SendEventsFromFile (string[] fileNames, int loopCount, bool utf8, bool autoBatch)
 Send a number of events from a file or stdin, specifying the file encoding detection mode and whether to auto-batch events or not. More...
 
void SetReconnectPeriod (long reconnectPeriodMillis)
 Set the minimum period between attempts to reconnect the client and/or any of the its named consumers that have been disconnected (e.g. as a slow consumer). More...
 
void SetReconnectPolicy (IReconnectPolicy policy)
 Set a singleton reconnection policy that will be used to limit when reconnection can be attempted for the client, and/or any of its named consumers that have been disconnected (e.g. as a slow consumer). More...
 
- Public Member Functions inherited from Apama.Net.Client.IBaseClient
void AddPropertyChangeListener (PropertyChangedEventHandler listener)
 Add a property change listener. Use this method to be informed whenever the a property value is changed. More...
 
void AddPropertyChangeListener (string propertyName, PropertyChangedEventHandler listener)
 Add a property change listener for a specific named property. More...
 
void AddPropertyChangeListenerSync (PropertyChangedEventHandler listener)
 Add a property change listener. Use this method to be informed whenever the a property value is changed. More...
 
void AddPropertyChangeListenerSync (string propertyName, PropertyChangedEventHandler listener)
 Add a property change listener for a specific named property. More...
 
void ConnectNow ()
 Manually request that the client connects to the remote server. Repeated calls are permitted, and attempting to connect a client that is already connected is identical to calling this PingServer(). More...
 
void Disconnect ()
 Disconnect from the server and terminate background threads; equivalent to Dispose(). More...
 
void FlushListeners ()
 Utility method that blocks until all pending property change listeners that have already fired have finished executing. More...
 
void PingServer ()
 Manually test if the remote server process is alive and responding to client requests. This method makes a no-arg, void return, method call on the client interface of the server. If a connection is not yet established, this method will request a connection. In the event that a connection cannot be established, or an error during the ping, an EngineException will be thrown. More...
 
void RemovePropertyChangeListener (PropertyChangedEventHandler listener)
 Remove a property change listener. More...
 
void RemovePropertyChangeListener (string propertyName, PropertyChangedEventHandler listener)
 Remove a property change listener for a specific named property. More...
 
void RemovePropertyChangeListenerSync (PropertyChangedEventHandler listener)
 Remove a property change listener registered with AddPropertyChangeListenerSync(). More...
 
void RemovePropertyChangeListenerSync (string propertyName, PropertyChangedEventHandler listener)
 Remove a property change listener for a specific named property registered with AddPropertyChangeListenerSync(). More...
 

Properties

bool AllConsumersConnected [get]
 Determine if the client and all of the existing uniquely-named consumers are connected. More...
 
- Properties inherited from Apama.Net.Client.IBaseClient
int ConnectionPollingInterval [get, set]
 Gets/sets the polling interval (in milliseconds) for the internal connection test thread. When setting the parameter, if the value of the parameter is negative, then the default value will be used instead. More...
 
string Host [get, set]
 Get the name of the host to be connected to. This is the name of the host on which the server to be monitored is running. More...
 
bool IsConnected [get]
 Get the connected property value. This is the status of the client - connected, or not connected. It indicates if the client has a valid instance of the underlying RPC interface. More...
 
bool IsMonitorOnly [get, set]
 Get/set the MonitorOnly property. An engine client running in "monitor only" mode cannot perform any state-changing operations on the remote component, nor can it receive events from it. Essentially it is limited to using the ping, inspect and watch operations only. More...
 
bool IsReceiveOnly [get, set]
 Get/set the ReceiveOnly property. An engine client running in "receive only" mode cannot perform any state-changing operations on the remote component, but it can receive events from it. More...
 
int Port [get, set]
 Get the port number to be connected to. This is the port number on which the server to be monitored is listening. More...
 

Detailed Description

This interface is for all operations that can be performed on an Apama component related to sending and receiving messages (e.g. events, injections, deletions, etc).

See Apama.Engine.Client.EngineClientConstants for constants used by this interface.

Receiving events using the engine client:

Clients wishing to use the engine client to receive events should do so by adding one or more named consumers, each of which has its own independent event listener and list of channels to receive from. The named consumer methods generally have "consumer" in their name.

Users needing more advanced send/receive functionality should also consider using the higher level Apama.Services.Event.IEventService rather than the engine client.

Use Apama.Event.Parser.EventType and its associated classes to parse and generate Apama.Event.Event objects for receiving and sending using this class.

Lifecycle of the engine client:

Once this engine client has been configured as needed (e.g. Apama.Net.Client.IBaseClient.Port, Apama.Net.Client.IBaseClient.Host), a connection can be established either synchronously using Apama.Net.Client.IBaseClient.ConnectNow (which throws an exception on error) or asynchronously using ConnectInBackground (which automatically retries until a connection is established - see Apama.Net.Client.IBaseClient.ConnectionPollingInterval and SetReconnectPeriod).

Once the client connected successfully, a background thread will keep pinging it to ensure the connection is still up (see Apama.Net.Client.IBaseClient.ConnectionPollingInterval). If the entire client connection is lost, the Apama.Net.Client.Interfaces.BaseClientConstants.PropertyConnected and Apama.Engine.Client.EngineClientConstants.PropertyAllConsumersConnected properties will change to false to notify the user of the engine client, and the client will continue to try to reconnect in the background (with the retry interval configurable using Apama.Net.Client.IBaseClient.ConnectionPollingInterval). If the client itself remains connected but its named consumers are disconnected by the engine (due to being slow, if slow consumer disconnection is enabled) then it is the caller's responsibility to force reconnection of the consumers by disconnecting and reconnecting the client (although applications with this requirement may be better off using the Apama.Services.Event.IEventService instead). To prevent reconnecting slow consumers too soon after disconnection, a minimum time between reconnection attempts can be configured using SetReconnectPeriod.

The engine client can be disconnected using Apama.Net.Client.IBaseClient.Disconnect whenever required, however once it is no longer needed any more, final cleanup should be performed by calling System.IDisposable.Dispose which will disconnect it and also ensure that any background threads started by the client have been terminated.

Thread-safety:

This class has locking so that concurrent use by multiple threads is safe.

To avoid deadlock problems, clients should not call methods on the object within synchronous event listeners - instead if this is required, the consumer should be added as asynchronous (see AddConsumer method), or the EventService should be used instead. However it is safe to call engine client methods (except Dispose) from within property change listeners (which are asynchronous by default from 5.2 onwards).

Note that the deprecated "simple receiver" feature (IMessagingClient.IsReceiveEnabled) was removed in the 5.1 release; the named consumer interface should now be used instead.

Member Function Documentation

IConsumerOperations Apama.Engine.Client.IMessagingClient.AddConsumer ( string  uniqueName,
params string[]  channels 
)

Add a new uniquely-named consumer that listens on a specified set of channels.

The consumer will default to not disconnecting if slow and being synchronous (i.e. the event listener must not call any methods on the client, for example SendEvents).

Parameters
uniqueNameThe unique name for the new consumer.
channelsThe list of channels on which the consumer should receive events. Must be non-null, and contain no null elements.
Returns

the new consumer.

Exceptions
Apama.EngineExceptionThrown if the consumer cannot be added (e.g. if the name is not unique), or if the channels parameter is invalid.
IConsumerOperations Apama.Engine.Client.IMessagingClient.AddConsumer ( string  uniqueName,
string[]  channels,
bool  disconnectSlow 
)

Add a new uniquely-named consumer that listens on a specified set of channels.

The consumer will default to not disconnecting if slow and being synchronous (i.e. the event listener must not call any methods on the client, for example SendEvents).

Parameters
uniqueNamethe unique name for the new consumer.
channelsthe list of channels on which the consumer should receive events.
disconnectSlowWhether to disconnect this consumer if slow.
Returns

the new consumer.

Exceptions
Apama.EngineExceptionThrown if the consumer cannot be added (e.g. if the name is not unique)
IConsumerOperations Apama.Engine.Client.IMessagingClient.AddConsumer ( string  uniqueName,
string[]  channels,
bool  disconnectSlow,
bool  async 
)

Add a new uniquely-named consumer that listens on a specified set of channels.

Parameters
uniqueNamethe unique name for the new consumer.
channelsthe list of channels on which the consumer should receive events.
disconnectSlowIf true, allow disconnection if consumer is slow.
asyncSpecifies whether the consumer is asynchronous - i.e. disconnect() doesn't wait for it. Only consumers with async set to true may access this object's methods and properties in their event listener.
Returns

the new consumer.

Exceptions
Apama.EngineExceptionThrown if the consumer cannot be added (e.g. if the name is not unique)
void Apama.Engine.Client.IMessagingClient.CancelDeleteFileRead ( )

The purpose of the CancelFileRead property is to provide a mechanism to cleanly terminate the processing of events from file, when the DeleteNamesFromFile() or KillNamesFromFile() method is in progress. When CancelFileRead is set to true, the Name deleting loop will terminate at the next iteration.

void Apama.Engine.Client.IMessagingClient.CancelInjectFileRead ( )

The purpose of the CancelInjectFileRead property is to provide a mechanism to cleanly terminate the processing of MonitorScripts from file, when the InjectMonitorScriptFromFile() method is in progress. When CancelInjectFileRead is set to true, the MonitorScript injecting loop will terminate at the next iteration.

void Apama.Engine.Client.IMessagingClient.CancelSendFileRead ( )

The purpose of the CancelSendFileRead property is to provide a mechanism to cleanly terminate the processing of events from file, when the IMessagingClient.SendEventsFromFile(string[], int) method is in progress. When CancelFileRead is set to true, the event sending loop will terminate at the next iteration.

void Apama.Engine.Client.IMessagingClient.ConnectInBackground ( )

Requests that the client begins to establish a connection automatically in the background.

Calling Apama.Net.Client.IBaseClient.Disconnect will bring connection attempts to an end. Repeated calls to this method, or calling this method after a connection has already been established will have no effect.

void Apama.Engine.Client.IMessagingClient.DeleteAll ( )

Deletes everything from the engine.

void Apama.Engine.Client.IMessagingClient.DeleteName ( string  name,
bool  force 
)

Delete a name from the engine. If a connection is not yet established, this method will request a connection.

Parameters
nameThe name to be deleted.
forceSet to true to forcably delete the name even if in use.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.DeleteNames ( string[]  names,
bool  force 
)

Delete a number of names. If a connection is not yet established, this method will request a connection.

Parameters
namesNames to be deleted.
forceSet to true to forcably delete the names even if in use.
void Apama.Engine.Client.IMessagingClient.DeleteNamesFromFile ( string[]  fileNames,
bool  force 
)

Delete a number of names from a file or stdin. If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read Names from. A file name "-" is taken to be stdin.
forceSet to true to forcably delete the names even if in use.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.DeleteNamesFromFile ( string[]  fileNames,
bool  force,
bool  utf8 
)

Delete a number of names from a file or stdin. If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read Names from. A file name "-" is taken to be stdin.
forceSet to true to forcably delete the names even if in use.
utf8If true, the specified files will be read as UTF-8; otherwise they will be read using the system default encoding unless they begin with a unicode Byte Order Mark (BOM) character.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.FlushEvents ( )

Wait for any outstanding events from previous Apama.Engine.EngineManagement.SendEvents(Apama.Event.Event[]) or SendEvents(bool, Apama.Event.Event[]) (where the Boolean is true) calls into the Engine, and then return.

See also
Apama.Engine.EngineManagement.SendEvents
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
IConsumerOperations [] Apama.Engine.Client.IMessagingClient.GetAllConsumers ( )

Get all existing uniquely-named consumers.

Returns
the array of all existing consumers.
IConsumerOperations Apama.Engine.Client.IMessagingClient.GetConsumer ( string  uniqueName)

Get an existing uniquely-named consumer.

Parameters
uniqueNamethe unique-name of an existing consumer.
Returns
the existing consumer, or null if one cannot be found with the specified name.
void Apama.Engine.Client.IMessagingClient.InjectCDP ( byte[]  cdpBytes,
String  filename 
)

Send the bytes of a CDP (Correlator Deployment Package) to the engine. If a connection is not yet established, this method will request a connection.

Parameters
cdpBytesThe byte array of the cdp file to be sent.
filenameThe name of the file we are injecting from.
Exceptions
EngineExceptionWhen failures happen.
void Apama.Engine.Client.IMessagingClient.InjectCDPsFromFile ( params string[]  fileNames)

Inject a number of CDP (Correlator Deployment Package)(s) from a file or stdin. If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of jar files to read Java (JMon) Applications from. A file name "-" is taken to be stdin.
Exceptions
EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.InjectJavaApplication ( byte[]  jarBytes)

Send the bytes of a Java (JMon) Application jar to the engine. If a connection is not yet established, this method will request a connection.

Parameters
jarBytesThe byte array of the Jar to be sent.
Exceptions
Apama.EngineExceptionThrown when failures happen.
void Apama.Engine.Client.IMessagingClient.InjectJavaApplicationsFromFile ( params string[]  fileNames)

Inject a number of Java (JMon) Application(s) from a file or stdin. If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of jar files to read Java (JMon) Applications from. A file name "-" is taken to be stdin.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.InjectMonitorScript ( MonitorScript  script)

Send MonitorScript text to the engine (using the obsolete MonitorScript object) without blocking concurrent calls to operations on this bean instance.

Deprecated - Use InjectMonitorScript(string) instead.

If a connection to the engine is not yet established, this method will attempt to make a connection.

Parameters
scriptThe MonitorScript object to be injected into the engine.
Exceptions
Apama.EngineExceptionThrown if the MonitorScript is rejected by the engine, or there is a problem sending the script.
void Apama.Engine.Client.IMessagingClient.InjectMonitorScript ( string  eplString)

Send MonitorScript text to the engine without blocking concurrent calls to operations on this bean instance.

If a connection to the engine is not yet established, this method will attempt to make a connection.

Parameters
eplStringThe MonitorScript to be injected into the engine.
Exceptions
Apama.EngineExceptionThrown if the MonitorScript is rejected by the engine, or there is a problem sending the script.
void Apama.Engine.Client.IMessagingClient.InjectMonitorScript ( string  eplString,
string  fileName 
)

Send MonitorScript text to the engine without blocking concurrent calls to operations on this bean instance.

If a connection to the engine is not yet established, this method will attempt to make a connection.

Parameters
eplStringThe MonitorScript to be injected into the engine.
fileNameThe name of the file being injected
Exceptions
Apama.EngineExceptionThrown if the MonitorScript is rejected by the engine, or there is a problem sending the script.
void Apama.Engine.Client.IMessagingClient.InjectMonitorScriptFromFile ( params string[]  fileNames)

Inject a number of monitors from a file or stdin. If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read MonitorScript text from. A file name "-" is taken to be stdin.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.InjectMonitorScriptFromFile ( string[]  fileNames,
bool  utf8 
)

Inject a number of monitors from a file or stdin. If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read MonitorScript text from. A file name "-" is taken to be stdin.
utf8If true, the specified files will be read as UTF-8; otherwise they will be read using the system default encoding unless they begin with a unicode Byte Order Mark (BOM) character.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.RemoveAllConsumers ( )

Remove and disconnect all existing uniquely-named consumers. If a consumer is asynchronous, it may still be called after this method has returned; otherwise, the RemoveConsumer will wait for any calls into the consumer to complete.

Do not call Disconnect(), RemoveConsumer() and RemoveAllConsumers() synchronously from a registered listener or from an implementation of IConsumerOperations.HandleEvents().

Exceptions
Apama.EngineExceptionThrown if there are problems while removing consumers.
void Apama.Engine.Client.IMessagingClient.RemoveConsumer ( string  uniqueName)

Remove and disconnect any existing uniquely-named consumer. If a consumer is asynchronous, it may still be called after this method has returned; otherwise, the RemoveConsumer will wait for any calls into the consumer to complete.

Do not call Disconnect(), RemoveConsumer() and RemoveAllConsumers() synchronously from a registered listener or from an implementation of IConsumerOperations.HandleEvents().

Parameters
uniqueNamethe unique-name of an existing consumer.
Exceptions
Apama.EngineExceptionThrown if the consumer cannot be removed.
void Apama.Engine.Client.IMessagingClient.SendEvents ( params Apama.Event.Event[]  events)

Send an array of Event objects to the Engine, performing auto-batching.

The current implementation of this method does perform automatic batching of the events, but a future release may change this behaviour, so please use the overloaded SendEvents(boolean, Event[]) method if you require control over this.

If a connection is not yet established, this method will request a connection.

Parameters
eventsThe array of Events to be sent.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.SendEvents ( bool  autoBatch,
params Apama.Event.Event[]  events 
)

Send an array of Event objects to the Engine, optionally not performing auto-batching.

If a connection is not yet established, this method will request a connection.

See also
Apama.Engine.EngineManagement.FlushEvents()
Parameters
autoBatchIf true, events will be automatically rebatched to improve throughput (even across separate SendEvents calls)
eventsThe array of Events to be sent.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.SendEventsFromFile ( string[]  fileNames,
int  loopCount 
)

Send a number of events from a file or stdin.

The current implementation of this method does not perform automatic batching of the events, but a future release may change this behaviour, so please use the overloaded SendEventsFromFile(string[], int, bool, bool) method if you require control over this.

If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read event descriptions from. A file name "-" is taken to be stdin.
loopCountLoop count for repeated reading of input data.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.SendEventsFromFile ( string[]  fileNames,
int  loopCount,
bool  utf8 
)

Send a number of events from a file or stdin.

The current implementation of this method does not perform automatic batching of the events, but a future release may change this behaviour, so please use the overloaded SendEventsFromFile(string[], int, bool, bool) method if you require control over this.

If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read event descriptions from. A file name "-" is taken to be stdin.
loopCountLoop count for repeated reading of input data.
utf8If true, the specified files will be read as UTF-8; otherwise they will be read using the system default encoding unless they begin with a unicode Byte Order Mark (BOM) character.
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.SendEventsFromFile ( string[]  fileNames,
int  loopCount,
bool  utf8,
bool  autoBatch 
)

Send a number of events from a file or stdin, specifying the file encoding detection mode and whether to auto-batch events or not.

If a connection is not yet established, this method will request a connection.

Parameters
fileNamesNames of files to read event descriptions from. A file name "-" is taken to be stdin.
loopCountLoop count for repeated reading of input data.
utf8If true, the specified files will be read as UTF-8; otherwise they will be read using the system default encoding unless they begin with a unicode Byte Order Mark (BOM) character.
autoBatchIf true, events will be automatically rebatched to improve throughput
Exceptions
Apama.EngineExceptionThrown if any exceptions occur in the Client SDK.
void Apama.Engine.Client.IMessagingClient.SetReconnectPeriod ( long  reconnectPeriodMillis)

Set the minimum period between attempts to reconnect the client and/or any of the its named consumers that have been disconnected (e.g. as a slow consumer).

By default there is no minimum reconnection period defined, and if any consumers have been disconnected by the engine, the client will attempt to reconnect them at least as often as the client's connection polling interval.

Any previously set reconnect policy will be overwritten when this method is called.

See also
SetReconnectPolicy
Parameters
reconnectPeriodMillisThe minimum reconnection period in milliseconds, or 0 to place no limit on how often we can attempt to reconnect.
void Apama.Engine.Client.IMessagingClient.SetReconnectPolicy ( IReconnectPolicy  policy)

Set a singleton reconnection policy that will be used to limit when reconnection can be attempted for the client, and/or any of its named consumers that have been disconnected (e.g. as a slow consumer).

In most cases, we recommend using SetReconnectPeriod instead of writing a custom policy object.

Property Documentation

bool Apama.Engine.Client.IMessagingClient.AllConsumersConnected
get

Determine if the client and all of the existing uniquely-named consumers are connected.

This is a bound property, so clients may also listen for property changes to EngineClientConstants.PropertyAllConsumersConnected.

If no named consumers have been added, this property is identical to IsConnected.

Returns
true if the client and all of the named consumers are connected, false otherwise.
Submit a bug or feature
Copyright (c) 2013-2016 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.