Closed tanneess closed 6 years ago
Note that using MessageCodec as a stop gap solution does not work with SockJs bridge since the bridge does not work for messages requiring a MessgeCodec. Only messages accepted by Json.checkAndCopy() are accepted in the EventBusBridgeImpl which is used by the SockJSHandlerImpl.
It turns out that there is no issue in the end. Apparently I did not re run code generation with my maven project after changing the signature of the method. A mvn clean install on the project fixed the issue.
thanks for letting us know
Generated VertxProxyHandler and VertxEBProxy do not require MessageCodecs for DataObjects that are passed as inputs. However sending a DataObject reply produces the following error: java.lang.IllegalArgumentException: No message codec for type.
This is because inputs are serialized/unserialized from Json while the reply is sent untouched through the event bus.
In a sense MessageCodec behaviour is backed in the VertxEBProxy and VertxProxyHandler for input and not outputs.
This is inconsistent and seems to me like a bug. This does not match what is documented here http://vertx.io/docs/vertx-service-proxy/java/#_restrictions_for_service_interface, which states that a DataObject should be ok for input as well as reply.