Client information used to authenticate, authorize & connect with service bus.
The information might be optional if the client is shared with an active SgServer instance.
In that case, resources are shared between the two.
See SbClientOptions.name for more information.
A unique name given to this client which allow referencing a specific client to be used by an emitter. In addition, the name is used to pair server & client together to allow sharing of resources (connections/senders/receivers).
By default the name is undefined, which is the identifier for the default client. In most cases a multi-client environment is not required and you will not use the name, this means that:
client is specified explicitly)Note that the name most be unique across all running instances (runtime scoped, not NestJS application scope) This means that only one default (empty name) server is allowed. If a duplicate name is detected the process will throw.
Generated using TypeDoc
Options for
SbClientSharing resources with
SgServer:When both
SgServerandSgClientare used you can link the two together to allow sharing of resources. This will allow sharing the connection, including credentials for both underlying client & managements connections.To link
SgServerandSgClient:SbServerOptions.name&SgClientOptions.nameare identical.SgClientOptions.clientis not set.By default, both identifiers are not set which means that the link is activated unless
SgClientOptions.clientis set.Note that this apply to
SgClientOptions.managementas well.If you wonder why we need to pair via id, see https://github.com/nestjs/nest/issues/4410#issuecomment-603685569. Basically, injection is now available in a microservice
Serverso we can't share resources in a transparent way.