I have a C # application that subscribes to a topic in our messaging system to update values. When a new value comes in, I do some processing and then continue. The problem is that updates can happen faster than the application can handle them. What I want to do is just keep the last value, so I don't want the queue. For example, the source publishes a value of "1" and my application receives it; during processing, the source publishes the sequence (2, 3, 4, 5) before my application is processed; my application then processes the value "5" and the previous values are thrown away.
It’s hard to publish a sample working code because it is based on proprietary message libraries, but I think it’s a common template, I just can’t understand what it called ... It seems that the processing function should work in a separate thread than the exchange callback messaging, but I'm not sure how to organize it, for example, how this thread is notified of a change in value. Any general tips on what I need to do?
source
share