0

this is how my azure function code looks like..

[FunctionName("Function1")]
        public static void Run([ServiceBusTrigger("myqueue/$DeadLetterQueue", Connection = "ServiceBusConnection")]Message myQueueItem, ILogger log, int deliveryCount,
            string messageId,
            string deadLetterSource,
            System.Collections.Generic.IDictionary<string, object> UserProperties
            )
        {}

I am able to get deadletter messages, but somehow not receiving regular messages from the service bus queue,

Is this expected behaviour?

if so how can i receive regular/deadletter messages in the same function.

I am using function 2.0 runtime.

Utkarsh Patel
  • 305
  • 2
  • 8

1 Answers1

2

Azure Function does not support receiving from more than a single source. A queue and its dead-letter queue are considered two different queues. You will need to have two Functions with some shared logic.

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80