infinity
infinity

Reputation: 1920

Azure Storage Queue - Retrieving hidden messages

Is there a way to retrieve azure storage queue messages that are hidden? Background - I have been searching for an app/cmdlet/third party tool that would let me backup the entire queue including hidden messages (for troubleshooting purposes) but unable to find one.

I have also considered writing a powershell script to download all messages, but couldn't find a way to retrieve hidden ones.

Help will be greatly appreciated!

Upvotes: 3

Views: 4099

Answers (3)

Jason Hogg - MSFT
Jason Hogg - MSFT

Reputation: 1378

You mention the reason for wanting to backup the queue as being for troubleshooting problems, depending on where your issues lie it might be worth taking at look at Azure Storage's Analytics capabilities. The logging infrastructure actually allows you to log every single transaction and greatly simplifies many troubleshooting scenarios. Take a look here for more information: http://blogs.msdn.com/b/windowsazurestorage/archive/tags/analytics+2d00+logging+_2600_amp_3b00_+metrics/.

Upvotes: 0

joshtkling
joshtkling

Reputation: 3538

While I don't know if such a tool exists for Azure Storage Queues, have you considered Azure Service Bus Topics and Subscriptions for your queueing system? Under a topic and subscription model, you can set up the following architecture:

[Topic] Place messages on this queue. They get replicated to each subscription.
 [Subscription1] Your backup process reads this queue and persists messages.
 [Subscription2] Your application reads from this queue for normal operation.

This has a few benefits:

  • it decouples your backup and production systems, making it less likely that, for example, a faulty backup script ends up impacting production behavior
  • Locked ("hidden") messages apply only to the given subscription, so your backup queue will never have to deal with a message that is hidden or locked by the production queue.

Similar setups can certainly be achieved using storage queues, but Azure Service Bus has this sort of behavior built in.

Upvotes: 4

Gaurav Mantri
Gaurav Mantri

Reputation: 136369

Simple answer is that you can't download all messages from a queue. Messages that are hidden are hidden from all other callers including any 3rd party apps so you can't read those messages other than from the application which made them hidden in the 1st place.

Upvotes: 3

Related Questions