0

We are consuming messages from Azure ServiceBus topic subscription. We don't own or manage the topic, we are just consumers. We would like to access previously consumed messages.

I did not found a way using API. I don't know if it is possible maybe for owner of topic.

Is it possible somehow seek backward / rewind topic subscription position and replay previous messages that are maybe still in topic ?

2 Answers 2

0

A topic subscription is basically like a queue, once a message is completed it's gone. It's not like Event Hub where you can choose what event to start from in a partition.

4
  • When I compare it to kafka, kafka topic contains messages with some retention and with beginning and end offsets for each partition. It can have many consumer groups with different committed offsets. But each consumer group can seek backward or forward in allowed offset range. I think the SB topic subscription is something similar. The SB topic contains messages and can have many subscribers consuming on different positions. So it would be nice to be able to seek in topic allowed position range. I wonder if it is possible for topic owner to reset specific subscription to topic begin.
    – blacksun
    Commented 9 hours ago
  • Event Hubs is similar to Kafka, not topics in Service Bus. No it is not possible to reset. The topics don't keep the messages.
    – juunas
    Commented 8 hours ago
  • Event Hubs is in fact similar enough that it has a Kafka-compatible endpoint: learn.microsoft.com/en-us/azure/event-hubs/…
    – juunas
    Commented 8 hours ago
  • Ok, thanks for answer and clarification.
    – blacksun
    Commented 6 hours ago
0

Thanks @juunas and I do agree that this is a queue based but not a stream one. If a message is completed in Queue or Topic's Subscription it cannot be retrieved back:

It can be completed by below way or by any programmatical way, it cannot be retrieved back:

enter image description here

But, from now on if you want to maintain the messages, then you can use Logic apps as an alternative, it triggers whenever a message arrives, and you can store it in a file or to another service bus topic or queue.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.