Broken Connections

To avoid missing messages, you should keep the WebSocket connected. However, interrupted connections do occur, so OHIP retains a record of the last message sent to each connection as well as up to 7 days of messages. If the WebSocket gets disconnected, reconnect as described in the Authentication message. OHIP will then send any messages that have occurred since the disconnection occurred. For example:

Note:

OHIP holds the last offset for 24 hours only. If you do not reconnect within 24 hours, you must send the offset in the subscribe message that reflects the last offset you received.

Table 13-1 How the Streaming API works around broken connections

Oracle Hospitality System Emits Offset OHIP Sends Partner Offset Partner Receives Offset

191

191

191

192

192

192

193

193

193

194

Connection broken

195

Connection broken

196

Connection broken

194

195

196

Connection re-established

194

195

196

197

197

197

If the WebSocket remains disconnected for over 7 days, this might result in missed messages. Refer to the following table for examples.

Table 13-2 How the Streaming API stores and replays 7 days of events

Day Oracle Hospitality System Emits Offset OHIP Sends Partner Offset Partner Receives Offset

1

191

191

191

1

192

192

192

1

193

193

193

2

194 to 317

Connection disconnected for day 1

3

318 to 520

Connection disconnected for day 2

4

521 to 701

Connection disconnected for day 3

5

702 to 929

Connection disconnected for day 4

6

930 to 1027

Connection disconnected for day 5

7

1028 to 1240

Connection disconnected for day 6

8

1241 to 1403

Connection disconnected for day 7

9

1404 to 1581

Connection disconnected for day 8

10

1582 to 1826

Connection disconnected for day 9

11

521 to 1826

Connection re-established

521 to 1826

11

1827

1827

1827

In this example, messages 194 to 521 are missed and it is not possible to replay them.