Skip to content

Simplify async use in subscribers #3

@sandtreader

Description

@sandtreader

Currently if a subscriber uses the MessageBusExt sugar function subscribe(), the handler gets called as a sync lambda, which means it has
to use tokio::spawn() to be able to call the async publish, which is by far the most common pattern.

We need a slightly less sugared version of subscribe() where you can subscribe with an async lambda. If this works well, it might be worth making this the default and taking a flag day hit on all existing modules.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions