eclipse-uprotocol / eclipse-uprotocol/up-cpp
Publisher constructor limits all messages to a single payload type
- Dominant language
- C++
- Stars
- 29
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
The Publisher constructor takes the expectedPayloadFormat as a constructor value and forces all messages to be of the same payload type. I think it would make sense to allow the payloadformat to either not be specified in the constructor, or use the UNSPECIFIED value as a "all payload formats accepted".
I'm working on the example programs for up-cpp, and I tried to send the exact same data in 2 different payload formats (TEXT & RAW - just to add to the example usage) and the code threw and exception because the expectedPayload didn't match the payload I tried to publish. So if I want to send 2 different types of payloads, I'd have to duplicate a lot of code, instead of simply publishing 2 different payloads.
Contributor guide
Assessment
This issue has not been assessed yet.