Replies: 1 comment 1 reply
-
can you elaborate perhaps with an example please? I'm not super familiar with the edit: ..or please feel free to create a pr if that's easier. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Are there any performance or functional implications when using
PoolFactory
with a pool size of 1 vs.SingleConnectionFactory
?I'm asking because passing pool size "statically" (i.e. not from
IOptions
) implies some difficulties (e.g. reading this value from aIConfiguration
with static config sections names).Would it break something or degrade performance noticebly if
PoolFactory
would be always used?It seems that in any case
INatsConnection
at the end is used as a singleton.The difference is that the interface is registered as a transient when used with a pool, but still accessed from a singleton class (the pool itself). And when pool size is 1 it is accessed directly as a singleton.
So before making a PR for this I wanted to ask what was the idea behind this separation. Performance? Some specific functionality?
Beta Was this translation helpful? Give feedback.
All reactions