Replies: 1 comment 1 reply
-
FastStream supports connection recovery without multiprocessing. It is the Broker feature. |
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
-
Hi,
I have some questions about the faststream CLI.
It seems like when setting a number of
workers
greater than 1, the CLI will call the classMultiprocess(BaseReload)
, which inherits fromBaseReload
. This enables the workers to be automatically reloaded if they crash. In my case, I have some issues with my nats server sometimes, and the natsbroker sometimes crashes because of annats.errors.TimeoutError
. I noticed that the faststream app would auto-restart, which is great.Is this feature (worker auto-restart) also available when using only 1 worker (that is one process)? If not, does this mean that the main/only process will crash and not be restarted?
Another question about the logging through the CLI. When using
faststream run app --workers 5
, if my natsbroker fails to connect, I have those logs in stderr:The problem is that they are not json formatted, and datadog cannot parse them properly.
I already modify the formatters of those logger:
But seems like it's not enough. Is there a way to format the log properly when the worker crashes?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions