# Inbound (to Notecard) notes FIFO?

**URL:** <https://discuss.blues.com/t/inbound-to-notecard-notes-fifo/210>\
**Category:** Notehub.io\
**Created:** [April 16, 2021, 6:35pm UTC](https://discuss.blues.com/t/inbound-to-notecard-notes-fifo/210 "2021-04-16T18:35:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francois](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/francois/32/15_2.png) [@Francois](https://discuss.blues.com/u/Francois)\
**Post date:** [April 16, 2021, 6:35pm UTC](https://discuss.blues.com/t/inbound-to-notecard-notes-fifo/210/1 "2021-04-16T18:35:55Z")

</div>

Assuming:

- I add rapidly via the API call 4 short notes for the same notecard
- the destination notecard is not moving, in continuous mode with fair connectivity to the network

On the notehub I see the notes for the .qi files added in the correct order  
Could you discuss in which situations (if at all possible), the notes would arrive in a chronologically different order at the notecard?

Second twist to the question:

- if note 1 goes to queueA.qi, note 2 to queueB.qi, note 3 to queueA.qi  
Is there a different answer if the notes are destined for different files?

Now I realize there are timestamps I might be able to use, but why bother if the exceptions to FIFO are extremely rare.

Thank you!

---

<div class="post-metadata">

**Author:** ![bsatrom](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/bsatrom/32/3_2.png) [@bsatrom](https://discuss.blues.com/u/bsatrom)\
**Post date:** [April 19, 2021, 8:55pm UTC](https://discuss.blues.com/t/inbound-to-notecard-notes-fifo/210/2 "2021-04-19T20:55:53Z")

</div>

Hey @Francois sorry that this question fell through the cracks over the weekend. Let me confirm my assumptions with the Notehub team before answering, just to make sure I don’t give you the wrong info.

---

<div class="post-metadata">

**Author:** ![bsatrom](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/bsatrom/32/3_2.png) [@bsatrom](https://discuss.blues.com/u/bsatrom)\
**Post date:** [April 19, 2021, 9:55pm UTC](https://discuss.blues.com/t/inbound-to-notecard-notes-fifo/210/3 "2021-04-19T21:55:31Z")

</div>

Hey @Francois, just FYI I tweaked your title since the substance of the question is about inbound notes from some service through [Notehub.io](http://Notehub.io) to a Notecard.

The answer to your question is somewhat dependent on how fast your service is sending Notes to Notehub using the API. When an inbound Note shows up, we give it a modified time down to a 1-second resolution, so if you are sending Notes less often than this, you should be ok. More frequently than 1-sec, and you won’t have enough resolution on the modified time to know for sure.

In terms of how they are delivered to your host when performing a `note.get`, Notes are delivered in FIFO-style (oldest first) using the modified timestamp above.

At the end of the day, we make reasonable attempts to order notes, but if you absolutely need inbound notes to always show up in the order they are added, you’ll need to add sequencing fields and logic on the host side.

---

<div class="post-metadata">

**Author:** ![Francois](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/francois/32/15_2.png) [@Francois](https://discuss.blues.com/u/Francois)\
**Post date:** [April 19, 2021, 10:15pm UTC](https://discuss.blues.com/t/inbound-to-notecard-notes-fifo/210/4 "2021-04-19T22:15:11Z")

</div>

@bsatrom Thank you for the detailed answer. In short, I’ll tag on a time.sleep(2) after each note inbound or outbound and “sleep” better myself!
