I am looking forward for a messaging product which can fulfil following use case.
- Publisher can publish messages over a topic.
- Whenever a consumer subscribes to a topic, he should first get messages published on the topic so far ( since the publisher started publishing) and onwards.
-
A message can have multiple versions. e.g. a message pertains to information for a stock. When that info changes, publisher publishes version 2 of the message. In such case, clients that connect later should see only version 2 of the message and not version 1.
-
This one is not a strict requirement but if publisher wants to delete some message from the broker cache, so that if any client connects later, he does not get some particular message in stream of previous messages.
I have looked at Red Hat MRG and Apache Active MQ products but they do seem to provide this functionality.
Red Hat Mrg Experience-
Red Hat MRG has a feature Initial Value Exchange but that caches only
single message on exchange. It also offers Last Value Queues which
support Versioned messages but they require a queue to be created in
advance for a consumer. I want something dynamic so that if a new
subscriber connects ( about whom I do not know in advance), it should
be able to send latest versions of all the messages published on that
topic. Will really appreciate you inputs/solutions to above use case.
Finally found the answer
This one is possible using RedHat Mrg.
You have to use browse only queues and create consumer (that do not send ack ) to get the Initial image and updates.