Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outbound serializer improvement #12

Open
jiangmengyu0409 opened this issue Nov 15, 2023 · 0 comments
Open

Outbound serializer improvement #12

jiangmengyu0409 opened this issue Nov 15, 2023 · 0 comments

Comments

@jiangmengyu0409
Copy link
Contributor

jiangmengyu0409 commented Nov 15, 2023

The current outbound serializer at https://github.com/Wiredcraft/nestjs-nsq-transporter/blob/master/src/requestor/outbound-event-serializer.ts#L9 will transfer the following format of message into an incorrect format:

Input message format:

{ meta: { transactionId: string; component: string; } data: { name: string; } }

Transferred format:

{ meta: { transactionId: string; component: string; timestamp: string; } data: { data: { name: string; } } }

This will cause nsq validator at consumer side to throw BadRequestException, as it was expecting the following format:
{ meta: { transactionId: string; component: string; timestamp: string; } data: { name: string; } }

@jiangmengyu0409 jiangmengyu0409 changed the title Outbound serializer improvment Outbound serializer improvement Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants