Event example

Via events you can send messages from your device to your application.

The Bosch IoT Hub service will guarantee the delivery of the message to the Things service. It means, if the connection between the Hub and Things is broken, the message will be queued in the Hub internal messaging infrastructure and will be delivered to Things as soon as the connection is established again and the Things sends an acknowledgement about receiving the message to the Bosch IoT Hub.

Schematic view

images/confluence/download/attachments/894252882/event.png

Use cases for events

Events are the communication pattern of choice if reliability is crucial for your business or functional requirements.

Due to the involved overhead for assured delivery and reliable processing and queuing, this approach has drawbacks considering latency and throughput.

A typical example for event messages is a fire alarm. This type of incident will happen only very rarely. But if it happens, it’s absolutely crucial that the message is send and processed successfully.

Prerequisites

At this point we assume that you went through all steps described at Getting started and have already registered a device and a thing.

Event request

The steps to send an event are the same as described in the previous Telemetry example.

Starting point is Bosch IoT Hub - HTTP Adapter - event/post_event.

After the Bosch IoT Hub has received the message from the device, it sends back an acknowledgement to the device.

After Things has processed the request, it sends the acknowledgement to Bosch IoT Hub.