4

I am new to Azure functions. I want to set up a queue trigger function to consume items in a queue. which the queue is a parallel queue separated from the main queue.

But when I run it, it keeps showing that :

 Executed 'QueueTrigger2' (Failed, Id=33e2634c-1c00-4996-a81a-fec47c088d73, Duration=163ms)
[2022-06-21T18:38:48.866Z] System.Private.CoreLib: Exception while executing function: QueueTrigger2. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myQueueItem'. System.Private.CoreLib: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

Does it mean that the messages in my queue is not a correct type? But it is a parallel queue from the main process queue. So I am sure it is correct. Or do I need to do some convert before the input?

Thank you.

superDu
  • 67
  • 9

1 Answers1

3

When posting messages to a service bus queue to be consumed by an azure function, you must first Base64 Encode the message. Answered here: https://stackoverflow.com/a/65000524/879247

Derek Williams
  • 525
  • 6
  • 21