Closed kbirken closed 6 years ago
Are there any insights on this so far? Can I help by providing some further information?
also, we are still on msgpack v1 https://github.com/crossbario/autobahn-cpp/issues/95
msgpack v1 has another issue: https://github.com/crossbario/autobahn-cpp/issues/166
Using the crossbar container from https://github.com/crossbario/crossbar-starter/ and the example client from "autobahn-cpp" in the same repo, I can get your example code above to successfully send that map (and have a Python subscriber receive it). Also the other way around. This is the exact subprotocol I see:
HTTP/1.1 101 Switching Protocols
Server: Crossbar
Upgrade: WebSocket
Connection: Upgrade
Sec-WebSocket-Protocol: wamp.2.msgpack.batched
How does this differ from @kbirken's setup?
Here is a complete example using integer maps, built using our AutobahnCpp toolchain images - and easy super easy to use: https://github.com/crossbario/crossbar-starter/blob/master/autobahn-cpp/app/client.cpp#L14
So, can't reproduce, closing. @kbirken
When trying to publish an object of type
std::unordered_map<uint32_t, std::string>
, Crossbar.io claims that there is an invalid serialization and cuts the connection. The publishing is done with code similar to this:Crossbar reports this on the console as:
If the key type of the map is changed to std::string, it works like a charm :-). So probably integer key types are not serialized in a way which is WAMP-compatible.