title: Service Bus trigger Azure function .net core 3.1
body: <p>I have written an Azure function (2.0).
  I am trying to consume a queue message (brokered message) like below.</p>
  <pre><code> FunctionName(&quot;ConsumeQueueMessage&quot;)]
       public static async Task InitiateQueueHandling([ServiceBusTrigger(&quot;queueName&quot;, Connection = &quot;AzureServiceBus&quot;)]BrokeredMessage queueMessage, ILogger log)
       {
           log.LogInformation($&quot;HTTP trigger function starting processing campaign seek request at : {DateTime.Now}.&quot;);
  </code></pre>
  <p>But when i run it locally I am getting an error like this</p>
  <p>Microsoft.Azure.WebJobs.Host: Exception binding parameter 'queueMessage'.
  Microsoft.Azure.WebJobs.Host: Binding parameters to complex objects (such as 'BrokeredMessage') uses Json.NET serialization.</p>
  <ol>
  <li>Bind the parameter type as 'string' instead of 'BrokeredMessage' to get the raw values and avoid JSON deserialization, or</li>
  <li>Change the queue payload to be valid json. The JSON parser failed: Unexpected character encountered while parsing value: @. Path '', line 0, position 0.</li>
  </ol>
  <p>Queue message is created as below</p>
  <pre><code>    var message = new BrokeredMessage(objWrapper);
               message.Properties[&quot;message&quot;] = JsonConvert.SerializeObject(objWrapper.Message);
               message.Properties[&quot;messageType&quot;] = objWrapper.Type.ToString();
  </code></pre>