Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Simple utility for peeking and forwaring/returning REBUS messages in ASB

Notifications You must be signed in to change notification settings

Signereno/RebusASBPeekAndReturn

Repository files navigation

RebusASBPeekAndReturn

Simple utility for peeking and forwarding/returning REBUS messages in ASB

string cn ="";
var r = new AzureServicebusPeekAndReturn("vegard-z230-queue-error", cn, null);
//Peek first 1000 messages
var peeked = await r.Peek(1000);
//Return to source-queue - Fail if not found
await r.Move(from m in peeked
    select
        new MessageToMove()
        {
            Delete = false, //Do not delete
            DestionationQueue = string.Empty, //No destinationqueue, rely on sourceque-header
            ReturnToSource = true, //Use sourcequeueheader as source
            MessageId = m.MessageId //Message to forward
        }, null); //null==no defaultqueue for non-peeked messages

About

Simple utility for peeking and forwaring/returning REBUS messages in ASB

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages