开发者

RabbitMQ : mark message as obsolete

开发者 https://www.devze.com 2023-02-07 19:33 出处:网络
Global question : can we mark a message as obsolete before it consummed by a client ? Context: I have a cluster of machines

Global question : can we mark a message as obsolete before it consummed by a client ?

Context:

  • I have a cluster of machines
  • Each machine send message when something change
  • The message is a Rails object that changed
  • The client, when getting this message, juste save it

Scenario

  • Given 3 machines A, B and C
  • Given the object O belongs to machine A
  • A is out of network
  • There is lot of changes on object O on machine A

When network is up again, I'd like to cancel all the messages regarding O, except the last one (producer side or consummer side). So B and C will not save all the states of the O object, but only the last 开发者_运维问答one.

Questions :

  • Do you think it is possible ?
  • Is there a better way to achieve syncronisation (we don't want to use MySQL cluster)

Thank you.


we are doing something silimar (in .net but) if a node goes off network or restarts then when it comes back the first thing it does is ask all the other nodes to a status upadte. All the node send this to all nodes. We then use a time stamp to only act on a message if its more recent than the last last one processed. Appears to work just fine for what we need which is 5 worker nodes all with the same configuration and syncing any chnages between themselves.

0

精彩评论

暂无评论...
验证码 换一张
取 消