Skip to content

Add a @pub kwarg to allow specifying a "startup response message"#258

Closed
goodboy wants to merge 1 commit intomainfrom
pubsub_startup_response_msg
Closed

Add a @pub kwarg to allow specifying a "startup response message"#258
goodboy wants to merge 1 commit intomainfrom
pubsub_startup_response_msg

Conversation

@goodboy
Copy link
Copy Markdown
Owner

@goodboy goodboy commented Nov 1, 2021

This is a fix for an (old and) undocumented feature that enabled async generator based "pub-sub" streaming such that during stream connection startup an initial "message" is sent to each new subscriber much like how the new tractor.Context.started() works for bidirectional streaming setup.

This patch in particular was pulled out of historical work on the infect_asyncio branch.

I'm not even sure this undocumented internal "pub sub" api should even be kept since it is basically just a multiplexed (read non-task oriented) version of what you can already do easily with our task-broadcast receiver apis and a single producer actor.

It's probably worth making a so called dynamic pub-sub example using the newer APIs for comparision, maybe do some brief perf benchmarks and then decide if we should just drop this interface?

@goodboy goodboy added messaging messaging patterns and protocols question Further information is requested labels Dec 27, 2021
@goodboy
Copy link
Copy Markdown
Owner Author

goodboy commented Dec 27, 2021

I'm thinking we should do a rewrite of this using the new bi-dir streaming + MsgStream.subscribe() apis and completely drop this internal subsystem.

@goodboy
Copy link
Copy Markdown
Owner Author

goodboy commented Jul 14, 2025

Heh, yeah this is totally obsolete and if anything similar were to be patched, it'd be based on the new @context-endpoint API(s) and typed msging feats.

Closing.

@goodboy goodboy closed this Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api messaging messaging patterns and protocols question Further information is requested streaming

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant