Availability of Communication Log Service (offline mode)
The Communication Log Service 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 Communication Log Service is provided by following class: com.ebd.hub.services.commlog.MessageCommunicationLogService.
The delivered 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 are immediately forwarded to the inner server. The Message Communication Log Service 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 Message Service tries independently to forward this persistent message during lifeTime. 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 Message Communication Log Service can not log a job number in offline mode because the data is not processed yet. These jobs then have no job number.
The Message Communication Log Service accesses its local Message Service using a service name that can be configured by parameter messageServiceName. Additionally, it needs access to its local Authentication Service 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 Message Authentication Service, the Message Queue, which is used for communication with the inner server, can be configured using parameters messageContext, messageQueue and defTargetService as well. Valid defaults 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 Message Authentication Service.
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 will be sufficient in all use cases. The value should be large enough so that messages that appear after that time do not exist 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 |
messageContext |
Context of consumer queue of inner Communication Log Service. |
System |
messageQueue |
Name of consumer queue that is used for requests to the inner Communication Log Service. It needs to match the name of the queue that the inner Communication Log Service is registered to. |
CommlogCall |
defaultTarget |
<host>:<port>, where the remote interface of the inner Message Service is reachable. |
Port: 8020 (if only the host and no port is specified) |
defTargetService |
Name, the inner Communication Log Service is registered with. |
CommunicationLogService |
maxWait |
Timeout using synchronous messages [ms]. |
8000 (8 seconds) |
lifeTime |
Lifetime for persistent messages [ms]. |
7200000 (2 hours) |
messageServiceName |
Registered name of the Message Service on this DMZ Server. |
MessageService |
authenticationServiceName |
Registered name of the Authentication Service on this DMZ Server. |
AuthenticationService |