Homam
Homam

Reputation: 23841

How to read the content of service bus messages only for monitoring

Is there a way to read messages in Queue or Topics without pulling it or changing any behavior (just for monitoring)?

Upvotes: 2

Views: 1385

Answers (1)

Sean Feldman
Sean Feldman

Reputation: 25994

Azure Service Bus allows to peek messages.

For example, you can use a QueueClient.PeekAsync() to to peek messages from a queue. There's an equivalent for topics and subscriptions as well.

In case you don't need to differentiate between messages from queues and subscriptions, there's a MessageReceiver.PeekAsync() option.

Upvotes: 3

Related Questions