faststream icon indicating copy to clipboard operation
faststream copied to clipboard

RFC: remove broker.connect(...) options

Open Lancetnik opened this issue 7 months ago • 2 comments

Now, connect method options have a prior on Broker.__init__ ones

broker = Broker("fake-url")  # will be ignored
await broker.connect("real-url")

Such behavior just doesn't solve any problem due we have a routers allows you to separate subscribers' declaration from broker createn, and keep the broker in main.py file only. But, such feature makes inner structure too complex and blocks some refactorings we have to make.

Thus I think we should deprecate this behavior in remove it in the future versions.

Have anybody thoughts about we shouldn't remove it?

Lancetnik avatar Apr 13 '25 12:04 Lancetnik

I think, we can deprecate this in 0.5.* and already remove in 0.6.0 pretty soon

Lancetnik avatar Apr 13 '25 12:04 Lancetnik

Hey, can I work on it?

ghost avatar Apr 14 '25 15:04 ghost