feat(device): support batch messages for HTTPS#889
Conversation
| * Internal constructor to initialize a bulk message instance. | ||
| * @param messages List of nested messages | ||
| */ | ||
| Message(Set<Message> messages) |
There was a problem hiding this comment.
This constructor is internal to the iot.device package.
|
So how does IoTHub accept these batch messages if one is malformed? Is it an all-or-nothing type API? |
|
If we plan on adding bulk message support to AMQP later, shouldn't we not allow users to call this API over AMQP? Since HTTP is the only protocol that actually currently supports bulk messages, I'd expect to see if (this.protocol != HTTPS)
{
throw new UnsupportedOperationException("Bulk messages are only supported over HTTPS");
} |
We sure can, We use the same API in our C# SDK and I tried to stay consistent with that. we can chat offline about this. |
This is an all or nothing API for HTTPS, I will add an e2e test to catch that and have coverage for those cases. |
| private boolean isBulk; | ||
|
|
||
| /** | ||
| * List of nested messages. |
There was a problem hiding this comment.
what do nested messages mean here?
There was a problem hiding this comment.
I have moved it to batched messages. That makes the batch message a wrapper around the same object type of Message.
…zure/azure-iot-sdk-java into feature/iot/azabbasi/httpbatch
timtay-microsoft
left a comment
There was a problem hiding this comment.
Just the one comment left, but otherwise looks good!
|
/azp run Java Prod Basic, Java Prod, SDL, horton-java-gate |
|
Azure Pipelines successfully started running 4 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 4 pipeline(s). |
No description provided.