This section expounds on and explains several important points, so that the user can easily use Talos Demo to verify the validity of their data:
Sometimes, users will use Talos as a file, hoping to "write 7 pieces of data", and then read back those 7 pieces of data at any time. Please keep in mind that Talos is a stream concept, and don't use it as a file.
1) Writing X pieces of data and reading back X pieces of data can have a delay (this delay isn't very long, it can be measured in ms), but the X pieces can't always be read back at any time.
2) When users write in X pieces, please confirm that all X pieces of data are written successfully, this will be reflected in the Producer's Callback while in Demo. When using TalosProducer, because it has a local buffer, data can become cached in the buffer and not come out, forcing the user to terminate the program. If Demo indicates that this is the case, please use TalosProducer's shutdown function. By doing this, Producer will wait for all of the data in the buffer to finish transmitting, and then stop the program again.
3) If users are hoping to read back X pieces, that isn't a problem, but they won't be able to read back X pieces any time they restart Consumer; the default is to read back from LastCommitOffset. Of course, Talos also supports read back beginning from StartOffset whenever the user restarts Consumer. For specific information please consult data model diagrams and TalosConsumer configuration instructions
If you run Demo, you can conduct data verification. Please use your integrated code to configure the corresponding URL and credential information.
When running Demo, please be careful to change your TopicName,consumerGroupName, and clientPrefix, for ease of distinguishing your client and conveniently tracking problems.
After running TalosProducerDemo, everything is put in 7 messages. Users can obtain a log like the one below, with message IDs from 0 to 6.
After running TalosConsumerDemo, you will get 7 messages total. Users can obtain a log like the one below, with message IDs from 0 to 6.