objective c - How do you replay missed messages when using STOMP to connect to RabbitMQ? -
i've got ios application uses stomp client talk rabbitmq. application loads lot of state during startup, , keeps state in sync receiving updates published on stomp. of course, if loses connection, can no longer sure it's in sync, , hence has re-load big initial blob. kind of network interruption triggers behavior , makes customers sad.
there lot of big-picture ways prepare (and i'm working on them) in meantime, i'm trying utilize persistent queues solve problem. thought server create queue, bind appropriate topics, , start building big startup bundle. when finished, hand off client. client set startup bundle, open subscription queue, , process updates happened while server getting things ready. similarly, if client should become disconnected, can reconnect , resume reading messages finds in queue.
my problem while client receives messages sent after connects, if there messages in queue before connected, not read. likewise, if client becomes disconnected, when reconnects, won't see messages arrived while away.
can suggest how might client able read missing messages?
it turns out happening stomp adapter consuming messages failing deliver them. thus, when client reconnected, wouldn't have messages waiting it.
to prepare problem, changed "ack" setting on subscribe request "client", meaning stomp shouldn't consider message delivered until client sends ack frame. changing client appropriately, messages delivered after client has been away.
objective-c rabbitmq stomp
No comments:
Post a Comment