You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am not sure if this is a bug but it concerns consumer_rabbit_middleware module. The message that is produced by StubTrigger is serialized twice. Therfore it results in escaped json string that is consumed by listener. In the end we end up with instance of Foo2 that has field foo with value of json ({"foo":"example"}).
The actual body is first created in StubRunnerExecutor::send method (JsonOutput.toJson method call). Then the resulting json string is serialized again : here when writing the payload to bytes - we end up with escaped json. The deserialization works since Foo2 has constructor that accepts String.
The solution would be to convert generic payload to bytes without using ObjectMapper (it will be String in this case so simple cast could be sufficient).
If it is not desired behaviour (at least I suspect so) I could create a PR for this.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am not sure if this is a bug but it concerns
consumer_rabbit_middleware
module. The message that is produced byStubTrigger
is serialized twice. Therfore it results in escaped json string that is consumed by listener. In the end we end up with instance ofFoo2
that has fieldfoo
with value of json ({"foo":"example"}
).The actual body is first created in
StubRunnerExecutor::send
method (JsonOutput.toJson
method call). Then the resulting json string is serialized again : here when writing the payload to bytes - we end up with escaped json. The deserialization works sinceFoo2
has constructor that acceptsString
.The solution would be to convert generic payload to bytes without using
ObjectMapper
(it will beString
in this case so simple cast could be sufficient).If it is not desired behaviour (at least I suspect so) I could create a PR for this.
The text was updated successfully, but these errors were encountered: