You're viewing archived documentation for @imqueue/core v2.0.26. APIs may differ from the current release. View the latest version ↗

core package

Classes

Class

Description

ClusteredRedisQueue

Class ClusteredRedisQueue Implements the possibility to scale queues horizontally between several redis instances.

IMQ

Message Queue Factory

RedisQueue

Class RedisQueue Implements simple messaging queue over redis.

UDPClusterManager

Enumerations

Enumeration

Description

IMQMode

LogLevel

Functions

Function

Description

buildOptions(defaultOptions, givenOptions)

Safely builds full options definition using default options and partial given options

T

copyEventEmitter(source, target)

intrand(min, max)

Returns random integer between given min and max

logDebugInfo(input)

Prints debug information

pack(data)

Compress given data and returns binary string

profile(options)

Implements '@profile' decorator.

promisify(obj, restrict)

Makes given object methods promise-like

propertiesOf(obj)

Returns entire list of the given object properties including entire prototype chain

sha1(str)

Returns SHA1 hash sum of the given string

unpack(data)

Decompress binary string and returns plain data

uuid()

Generates and returns Unified Unique Identifier

verifyLogLevel(level)

Checks if log level is set to proper value or returns default one

Interfaces

Interface

Description

DebugInfoOptions

EventMap

ILogger

Logger interface

IMessage

Defines message format.

{IMessage}

IMessageQueue

Generic messaging queue implementation interface

IMessageQueueAuthConnection

IMessageQueueConnection

IMQOptions

Message queue options

IRedisClient

Extends default Redis type to allow dynamic properties access on it

{IRedisClient}

IServerInput

JsonArray

Represents JSON-serializable array

JsonObject

Represents JSON serializable object

ProfileDecoratorOptions

UDPClusterManagerOptions

Variables

Variable

Description

DEFAULT_IMQ_OPTIONS

DEFAULT_UDP_CLUSTER_MANAGER_OPTIONS

IMQ_LOG_ARGS

Environment variable IMQ_LOG_ARGS=[1, 0] - enables/disables profiled call arguments to be logged

{boolean}

IMQ_LOG_LEVEL

IMQ_LOG_TIME_FORMAT

Environment variable IMQ_LOG_TIME_FORMAT=[ 'microseconds', 'milliseconds', 'seconds' ]. Specifies profiled time logging format, by default is 'microseconds'

{AllowedTimeFormat | string}

IMQ_LOG_TIME

Environment variable IMQ_LOG_TIME=[1, 0] - enables/disables profiled timings logging

{boolean}

IMQ_SHUTDOWN_TIMEOUT

Type Aliases

Type Alias

Description

AllowedTimeFormat

AnyJson

Represents any JSON-serializable value

IJson

Alias for JsonObject, legacy, outdated, deprecated, try to avoid using. Stands here for backward-compatibility only

IMessageQueueConstructor