Availability of CommunicationLogService (offline mode)

The CommunicationLogService stores communications in the Communication Log, like for example the upload of a file via FTP, including timestamp, job number, etc. The database table is maintained by the inner server. On the DMZ server, the CommunicationLogService is provided by class com.ebd.hub.services.commlog.MessageCommunicationLogService. The file ./etc/commlog_dmz.xml is used to configure the service, see table below.

In online mode (regular case), accesses to communication services on the DMZ server are immediately forwarded to the inner server. The MessageCommunicationLogService uses synchronous messages to the inner server. If the synchronous message can not be delivered because, for example, the inner server is down or if the response is not received during the maximum waiting time maxWait for any other reason, a persistent message is generated (offline mode).

In offline mode the MessageService tries independently to forward this persistent message. As soon as the inner server can be reached again, the communication event is logged retroactively. However, if the lifeTime of this message is exceeded, the log entry is lost. Note: The CommunicationLogService cannot log a job number in offline mode because the data are not being processed yet. These jobs then have no job number.

The MessageCommunicationLogService accesses its local MessageService using a service name that can be configured in parameter messageServiceName. Additionally, it needs access to its local AuthenticationService through the service name, which can be configured using parameter authenticationServiceName. Valid defaults are preconfigured. An explicit configuration is only necessary in special cases.

Analogous to the MessageAuthenticationService, the Message Queue, which is used for communication with the inner server, can be configured using parameters messageContext, messageQueue and defTargetService. Valid default values are preconfigured. An explicit configuration is only necessary in special cases and only in combination with the inner server.

The defaultTarget defines the message route to the inner server and does not need to be configured here if it has already been configured for the MessageAuthenticationService.

The parameter maxWait defines the maximum waiting time in milliseconds that a response to a synchronous message is waited for. The default value of 8000 ms should be sufficient for all use cases. The value should be large enough so that messages appearing after that time do not occur in practice.

The parameter lifeTime should be configured explicitly if you need to bridge gaps that could take longer than the default value of two hours. If the network connection is lost for a longer period than configured in lifeTime, logs will be lost.

The file ./etc/commlog_dmz.xml contains comment blocks that hold the most important configuration parameters for the service. All parameters are located in the Configure element.


<Configure class="com.ebd.hub.services.commlog.MessageCommunicationLogService">
...
</Configure>


Each parameter is defined in the following way (abstractly here).


<Set name="parameter_name">parameter_value</Set>


Parameters in file ./etc/commlog_dmz.xml:


Parameter

Function

Default Value

authenticationServiceName

Registered name of the AuthenticationService on this DMZ server.

AuthenticationService

defaultTarget

<host>:<port>, where the remote interface of the inner MessageService is reachable. For example 192.168.254.12:8020

8020 (default value for the port if only the host and no port is specified)

defTargetService

The name, under which the inner CommunicationLogService is registered.

CommunicationLogService

lifeTime

Lifetime for persistent messages in ms.

7200000 (2 hours)

maxWait

Timeout using synchronous messages in ms.

8000 (8 seconds)

messageContext

Context of the consumer queue of the inner CommunicationLogService.

System

messageQueue

Name of consumer queue that is used for requests to the inner CommunicationLogService. It needs to match the name of the queue that the inner CommunicationLogService is registered to.

CommlogCall

messageServiceName

Registered name of the MessageService on this DMZ server.

MessageService