|
12 | 12 |
|
13 | 13 |
|
14 | 14 | if import_checker.is_faststream_installed: |
15 | | - from faststream._internal.broker import BrokerUsecase |
16 | 15 | from faststream.asgi import AsgiFastStream, AsgiResponse |
17 | 16 | from faststream.asgi import get as handle_get |
18 | 17 |
|
@@ -50,8 +49,7 @@ def __init__( |
50 | 49 |
|
51 | 50 | @dataclasses.dataclass(kw_only=True, slots=True, frozen=True) |
52 | 51 | class FastStreamConfig(HealthChecksConfig, LoggingConfig, OpentelemetryConfig, PrometheusConfig, SentryConfig): |
53 | | - application: "AsgiFastStream" = dataclasses.field(default_factory=lambda: AsgiFastStream()) |
54 | | - broker: typing.Optional["BrokerUsecase[typing.Any, typing.Any]"] = None |
| 52 | + application: "AsgiFastStream" |
55 | 53 | opentelemetry_middleware_cls: type[FastStreamTelemetryMiddlewareProtocol] | None = None |
56 | 54 | prometheus_middleware_cls: type[FastStreamPrometheusMiddlewareProtocol] | None = None |
57 | 55 | health_checks_additional_checker: typing.Callable[[], typing.Coroutine[bool, typing.Any, typing.Any]] | None = None |
@@ -160,8 +158,6 @@ def is_ready(self) -> bool: |
160 | 158 |
|
161 | 159 | def __init__(self, bootstrap_config: FastStreamConfig) -> None: |
162 | 160 | super().__init__(bootstrap_config) |
163 | | - if self.bootstrap_config.broker: |
164 | | - self.bootstrap_config.application.set_broker(self.bootstrap_config.broker) |
165 | 161 | self.bootstrap_config.application.on_shutdown(self.teardown) |
166 | 162 |
|
167 | 163 | def _prepare_application(self) -> "AsgiFastStream": |
|
0 commit comments