06-23-2023 09:15 AM
My consumer loop has 4 states. I would like to see data streaming continuously when I click "Generate" button only once, but instead I am only getting signal in segment and I have to keep clicking "generate". I just want to see data streaming continuously when I click once, not multiple times. Can someone please help?
Solved! Go to Solution.
06-23-2023 09:45 AM
You send 1 Message to the consumer, so you get 1 value for the chart.
One thing you can do to get values continuously is to enqueue another message "Generate" in the case "Generate" (sending a new message to itself).
06-23-2023 10:25 AM
Hi UliB,
I tried modifying the code as you suggested, but did not work.
06-23-2023 10:46 AM
This is what you're doing:
This is what UliB suggested you to do:
06-23-2023 11:02 AM
Thanks Antonio for the clarification, but it still did not work unfortunately.
06-23-2023 11:28 AM - edited 06-23-2023 11:32 AM
Just implemented what was suggested and it works:
I don't know why you have changed your code since the first post but here are some comments on your last screenshot:
- The random value should not be set as a parameter of your command since it is the "Generate" case that has to generate the value (obviously).
- You should not put a Dequeue Element inside the case structure of the consumer, that makes no sense. The consumer is here to dequeue messages one at a time and each message type has its case.
06-23-2023 11:36 AM
Thanks guys!!!! It works. All you guys deserve a best answer. And more thanks to Raphschru for the great explanation of this works.