config

chat-service. config

Type Definitions

options

Properties:
Name Type Attributes Default Description
port boolean <optional>
8000

Port number.

enableAccessListsUpdates boolean <optional>
false

Default value for new rooms. Enables rpc.serverNotifications.roomModeChanged, rpc.serverNotifications.roomAccessListAdded and rpc.serverNotifications.roomAccessListRemoved notifications. Can be changed individually for any room via chat-service.ServiceAPI#changeAccessListsUpdates.

enableDirectMessages boolean <optional>
false

Enables user to user rpc.clientRequests.directMessage communication.

enableRoomsManagement boolean <optional>
false

Allows to use rpc.clientRequests.roomCreate and rpc.clientRequests.roomDelete.

enableUserlistUpdates boolean <optional>
false

Default value for new rooms. Enables rpc.serverNotifications.roomUserJoined and rpc.serverNotifications.roomUserLeft messages. Can be changed individually for any room via chat-service.ServiceAPI#changeUserlistUpdates.

historyMaxGetMessages number <optional>
100

Room history size available via rpc.clientRequests.roomRecentHistory or via a single invocation rpc.clientRequests.roomHistoryGet.

historyMaxSize number <optional>
10000

Default value for rooms. Can be changed individually for any room via chat-service.ServiceAPI#changeRoomHistoryMaxSize.

directListSizeLimit number <optional>
1000

Maximum number of entries allowed in direct messaging permissions lists.

roomListSizeLimit number <optional>
10000

Maximum number of entries allowed in room messaging permissions lists (the userlist is not affected by this option).

useRawErrorObjects boolean <optional>
false

Send error objects instead of strings. See rpc.datatypes.ChatServiceError.

closeTimeout number <optional>
15000

Maximum time in ms to wait before a server disconnects all clients on shutdown.

heartbeatRate number <optional>
10000

Service instance heartbeat rate in ms.

heartbeatTimeout number <optional>
30000

Service instance heartbeat timeout in ms, after this interval instance is considered inactive.

busAckTimeout number <optional>
5000

Cluster bus ack waiting timeout in ms.

state 'memory' | 'redis' | chat-service.StorePlugin <optional>
'memory'

Service state implementation.

transport 'socket.io' | chat-service.TransportPlugin <optional>
'socket.io'

Transport implementation.

stateOptions chat-service.config.RedisStateOptions | Object <optional>
{}

Options for a state.

transportOptions chat-service.config.SocketIOTransportOptions | Object <optional>
{}

Options for a transport.

adapter 'memory' | 'redis' | Class <optional>
'memory'

Legacy, use chat-service.config.SocketIOTransportOptions

adapterOptions Object | Array.<Object> <optional>
[]

Legacy, use chat-service.config.SocketIOTransportOptions

Type:
  • Object

RedisStateOptions

Properties:
Name Type Attributes Default Description
useCluster boolean <optional>
false

Enable Redis cluster.

lockTTL number <optional>
10000

Locks timeout in ms.

redisOptions Object | Array.<Object> <optional>
[]

ioredis client constructor arguments. If useCluster is set, used as arguments for a cluster client constructor.

Type:
  • Object

SocketIOTransportOptions

Properties:
Name Type Attributes Default Description
namespace string <optional>
'/chat-service'

Socket.io namespace.

middleware Array.<function()> | function <optional>
[]

Socket.io middleware to use on namespace.

io Object <optional>
null

Socket.io instance that should be used by Chat Service.

http Object <optional>
null

Use socket.io http server integration, used only when no io object is passed.

ioOptions Object <optional>
{}

Socket.io additional options, used only when no io object is passed.

adapter 'memory' | 'redis' | Class <optional>
'memory'

Socket.io adapter constructor used only when no io object is passed.

adapterOptions Object | Array.<Object> <optional>
[]

Adapter constructor arguments.

Type:
  • Object