chat-service.ChatService
options.
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 |
enableDirectMessages |
boolean |
<optional> |
false
|
Enables user to
user |
enableRoomsManagement |
boolean |
<optional> |
false
|
Allows to use
|
enableUserlistUpdates |
boolean |
<optional> |
false
|
Default value for
new rooms. Enables |
historyMaxGetMessages |
number |
<optional> |
100
|
Room history size
available via |
historyMaxSize |
number |
<optional> |
10000
|
Default value for
rooms. Can be changed individually for any room via |
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 |
useRawErrorObjects |
boolean |
<optional> |
false
|
Send error objects
instead of strings. See |
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
|
adapterOptions |
Object | Array.<Object> |
<optional> |
[]
|
Legacy, use
|
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 |
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 |
ioOptions |
Object |
<optional> |
{}
|
Socket.io additional options, used
only when no |
adapter |
'memory' | 'redis' | Class |
<optional> |
'memory'
|
Socket.io
adapter constructor used only when no |
adapterOptions |
Object | Array.<Object> |
<optional> |
[]
|
Adapter constructor arguments. |
Type:
- Object