This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Let's add a few entries in our stream "mystream". Every entry in a stream is like | |
| # an hash, composed of fields and values, but every entry can have different fields. | |
| # XADD appends a new entry in a stream, and returns an unique ID which is guaranteed | |
| # be incrementing. | |
| # The first part of the ID is the millisecond unixtime during the | |
| # addition (or the time of the last entry in the stream, if greater than the current time). | |
| # The second part of an entry is a 64 bit counter for entries added in the same ms. | |
| 127.0.0.1:6379> XADD mystream name pamela nicknake kill-9 |