-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Labels
CoreIssues related to core FastStream functionality and affects to all brokersIssues related to core FastStream functionality and affects to all brokersenhancementNew feature or requestNew feature or request
Description
We would like to support publishing messages with a specific pattern, such as logs.{level}.
Here is an example of how this could be implemented:
publisher = broker.publisher("logs.{level}")
await publisher.publish("Hi!", level="info") # should be interpreted as "logs.info" destinationSuggested implementation:
async def publish(self, message: SendableMessage, **kwargs: Any) -> None:
dest = self.destination.format(**kwargs)
await self._publish(message, dest)As a reference we can use current compile_path function using for pattern-based subscribers: https://github.com/search?q=repo%3Aag2ai%2Ffaststream%20compile_path&type=code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CoreIssues related to core FastStream functionality and affects to all brokersIssues related to core FastStream functionality and affects to all brokersenhancementNew feature or requestNew feature or request