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

Add hints for subscription OperationMessage's payload serialization. #716

Merged

Conversation

berngp
Copy link
Contributor

@berngp berngp commented Nov 2, 2021

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Context

Users are observing that some of the fields are being dropped from the subscription messages, specifically the "type":"SUBSCRIPTION_DATA". This is causing issues with clients that assumed that such field would exist to be able to identify what kind of message it was.

Changes in this PR

The idea of this commit is to aid Jackson infer the content of the OperationMessage payload by adding the @JsonSubType hint.
With this we can tell Jackson that the type could be either...

  • empty, via the EmptyPayload class.
  • data, via the DataPayload class.
  • query, via the QueryPayload class

@berngp berngp marked this pull request as ready for review November 2, 2021 00:10
The idea of this commit is to aid Jackson infer the content of the
`OperationMessage` payload by adding the `@JsonSubType` hint. With this
we can tell Jackson that the type could be either...

* empty, via the EmptyPayload class.
* data, via the DataPayload class.
* query, via the QueryPayload class
@berngp berngp force-pushed the feature/sse-subscription-operation-message branch from 62bbb03 to 36ea67e Compare November 2, 2021 00:34
@srinivasankavitha srinivasankavitha merged commit 7b6513b into master Nov 2, 2021
@berngp berngp deleted the feature/sse-subscription-operation-message branch October 20, 2022 01:49
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.

None yet

2 participants