Inspect hidden messages in queue - azure-queues

When adding a message to a queue, if the initialVisibilityDelay is set, eg initialVisibilityDelay = 10 minutes, I cant see it. Is there any way to inspect messages that are not visible?
I am unable to see it in the Azure Storage Explorer.

Related

ActiveMQ: view the content of the enqueued messages

I am using ActiveMQ with web console (activemq-web-console-5.16.4) in TomEE. The ActiveMQ-web-console-5.16.4.war was added to the TomEE webapps folder. Afterwards, I could access the web console. Currently, I want to view/monitor the content of enqueued/processed messages in the web console "Messages Enqueued". How can I manage that in my case? Should I bind the KahaDB message store or other databases?
In my application I use Apache Camel and send messages from one route to another by ActiveMQ.
I would appreciate any help.
Screenshots:
You can use the web console itself to view the content of the message assuming it fits into the narrow constraints of what the console can decode into human readable format.
First, click the "Browse" link.
Second, click the link for the actual message.
Third, see the "Message Details."
To be clear, you can only inspect the content of messages which are in the queue. This is represented by the "Number of Pending Messages." The "Messages Enqueued" is the number of messages sent to the queue (but not necessarily in the queue currently) since the broker was started. The "Messages Dequeued" is the number of messages consumed from the queue. In your case you have 66 messages which have been enqueued and dequeued (i.e. consumed) and therefore 0 pending messages.
If you want to keep a copy of every message sent to your queue for auditing purposes you can use a mirrored queue. As noted previously, you can only inspect messages which are in the queue and a mirrored queue will hold a copy of every message sent to the source queue allowing you to inspect those messages at your convenience.

RabbitMQ more messages than expected on fixed size queue

I have a publisher that sends messages to a consumer that moves a motor.
The motor has a work queue which I cannot access, and it works slower than the rate of the incoming messages, so I'm trying to control the traffic on the consumer.
To keep updated and relevant data coming to the motor without the queue filling up and creating a traffic jam, I set the RabbitMQ queue size limit to 5 and basicQos to 1.
The idea is that the RabbitMQ queue will drop the old messages when it is filled up, so the newest commands are at the front of the queue.
Also by setting basicQos to 1 I ensure that the consumer doesn't grab all messages from the queue and bombards the motor at once, which is exactly what i'm trying to avoid since I can't do anything once the command was sent to the motor.
This way the consumer takes messages from the queue one by one, while new messages replace the old ones on the queue.
Practically this moves the bottleneck to the RabbitMQ queue instead of the motor's queue.
I also cannot check the motor's work queue, so all traffic control must be done on the consumer.
I added messageId and tested, and found out many messages are still coming and going long after the publisher is being shut down.
I'm expecting around 5 messages after shutdown since that's the size of the queue, but i'm getting hundreds.
I also added a few seconds of sleep inside the callback to make sure this isn't the robot queue that's acting up, but i'm still getting many messages after shutdown, and I can see in the logs the callback is being called every time so it's definitely still getting messages from somewhere.
Please help.
Thanks.
Moving the acknowledgment to the end of the callback solved the problem.
I'm guessing that by setting basicQos to 1 it did execute the callback for each message one after another, but in the background it kept grabbing messages from the queue.
So even when the publisher was shutdown, the consumer still had messages that were taken from the queue in it, and those messages were the ones that I saw being executed.

EventHub Triggered FunctionApp Locally - Where are messages stored?

While I am developing the Azure Function App with Event Hub triggered locally, something wired which drew my attention. When I started debugging, my consumer function app will occasionally automatically be triggered with my previous message through event hub, however, I didn't even fire my event hub publisher at that time! It felt like some event messages were stored in some cache places where I have no idea where they are, that were also trying to trigger my function app from background again and again...
My App settings for my function is using UseDevelopmentStorage=true, and is not related to any of my storage account, in addition above scenario did not always happen every time, but it made me concerned because I had no idea why the same message to be triggered multiply times that are out of my control, once message were published and consumed by function app, it should disappear from event hub message queue, right?
Can anyone please let me know where I can check my messaged stored locally or when published in Azure portal? Thank you very much!
Can anyone please let me know where I can check my messaged stored
locally or when published in Azure portal?
Firstly,i'm afraid that azure function won't save your messages into cache.Based on the official document:
When all function execution completes (with or without errors),
checkpoints are added to the associated storage account. When
check-pointing succeeds, all 1,000 messages are never retrieved again.
Above is description of event hub checkpoint mechanism.Besides,you could refer to this blog. The AzureWebJobsStorage is set to be UseDevelopmentStorage=true when you debug function locally,so i suggest you checking the data in the local storage account.When you run it on the portal,associated storage account will be checked.
Here are some similar issues for your reference:
1.https://github.com/Azure/azure-functions-host/issues/2796
2.https://github.com/Azure/Azure-Functions/issues/589
3.https://github.com/Azure/azure-event-hubs-dotnet/issues/358
Of course,you could open a stack here to get more help.

How to view Azure storage account queue

I have a queue in my Azure storage account queue. I want a tool to see what is inside that queue.
I have tried 'CloudBerry Explorer for Azure Blob Storage', but that does not let me see the content of the queue.
And I tried 'Azure Storage Explorer', I can only see top 32 messages of the queue.
Can I see all the message in the queue?
And is there a tool allow me to change the order of message in the queue?
Azure Queue storage does not guarantee message ordering and therefore does not also provide a way to reorder messages.
There are two ways to see the contents of existing messages: Get Messages API and Peek Messages API. Both allow retrieving up to 32 messages at a time, so there is no way to view more than 32 messages without making the first 32 invisible (dequeue) first with Get Messages API.

ActiveMQ view raw message data in web console

I'm using the web console against my AMQ 5.2 instance successfully, except for I cannot see the content of all of my messages.
If I send a test message using the web console, I can see the sample text content, but I believe the vendor app I am working with has binary or byte array message content.
Is there something I need to do to be able to view this raw data?
Thanks,
To my knowledge, it is not possible to inspect messages in the Admin Console. You can get some statistics (like how many messages have been sent etc.).
ActiveMQ does not unmarshal messages when receiving them (for performance reasons, unmarshalling is rather expensive).
Thus, if you want to have some way to inspect messages for their content, you can basically do 2 things:
Write a consumer which registers for all topics/queues, through which you can see messages' content. Drawback: if you're using queue-based interaction, your "real" consumers will not get all messages
Write an activeMQ plugin which looks at the messages. Have a look at ActiveMQ's Logger Plugin. Then write your own (you'll need the sources to compile it) and load it with ActiveMQ (see the documentation on how to configure ActiveMQ to load plugins). You want to override the send() method which is called whenever someone sends a message to the broker. There you get a reference to the message and can access its content.
Neither of the two messages provides a convenient viewing-mechanism though. You'll have to resort to standard out, or write your own web-based access.
hawtio now shows first 256 chars of messages. Don't know if that is enough for you. Use browse() method.