Skip to content

feat: wire pydantic serializer through broker.publish#7

Merged
lesnik512 merged 1 commit into
mainfrom
feat/pydantic-publish
May 20, 2026
Merged

feat: wire pydantic serializer through broker.publish#7
lesnik512 merged 1 commit into
mainfrom
feat/pydantic-publish

Conversation

@lesnik512
Copy link
Copy Markdown
Member

Match FastStream's broker convention: accept a SerializerProto on OutboxBroker, store it in FastDependsConfig, and pass the resolved value to encode_message. The EMPTY default resolves to PydanticSerializer, so broker.publish(pydantic_model, ...) now JSON-encodes instead of raising TypeError from the json_dumps fallback.

Match FastStream's broker convention: accept a SerializerProto on
OutboxBroker, store it in FastDependsConfig, and pass the resolved value
to encode_message. The EMPTY default resolves to PydanticSerializer, so
broker.publish(pydantic_model, ...) now JSON-encodes instead of raising
TypeError from the json_dumps fallback.
@lesnik512 lesnik512 self-assigned this May 20, 2026
@lesnik512 lesnik512 merged commit 8499264 into main May 20, 2026
3 checks passed
@lesnik512 lesnik512 deleted the feat/pydantic-publish branch May 20, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant