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

Potential bug that will throw error using default inbound-message-deserializer #6

Open
jiangmengyu0409 opened this issue Mar 26, 2022 · 0 comments

Comments

@jiangmengyu0409
Copy link
Contributor

jiangmengyu0409 commented Mar 26, 2022

@xavierchow The following code will throw Exception has occurred: TypeError: Converting circular structure to JSON when the input msg is not a valid json string, as it was trying to stringify the whole Message object.

Suggest to change the following line to set value.body to msg instead of value itself to avoid potential issues. For example, if the current message in nsq is not a valid json string, it will prevent this message from being processed by any message handler and will eventually cause timeout on this message.

An easy way to re-create this issue is by sending the following message to nsq through nsqd pub api:

{
  "user": {
    // "id": "test-id-1"
    "id": "test-id-2"
  }
}
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