message body that are sent via event hubs are not received in Json array format

SriRaghavendran Prabhakaran 320 Reputation points
2024-09-09T15:29:15.1266667+00:00

Hello Team,

we have logic app configured with EventHub as its input trigger. when we are passing JSON array message from upstream function apps, that is received at logic app as object instead of array. Any suggestion to enable any setting at EventHub level to get the data in desired format?

thanks,

Sri.

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
646 questions
{count} votes

1 answer

Sort by: Most helpful
  1. NIKHILA NETHIKUNTA 3,265 Reputation points Microsoft Vendor
    2024-09-10T09:49:18.07+00:00

    @SriRaghavendran Prabhakaran
    Thank you for the question and for using Microsoft Q&A platform.

    Here are some troubleshooting steps you can try:

    1. Check the format of the message being sent from the upstream function app. Make sure it is a valid JSON array and not an object.
    2. Check the format of the message being received by the EventHub trigger in the logic app. You can use the "Parse JSON" action in the logic app to parse the message and check its format. This can help ensure that the data is interpreted correctly as an array.
    3. If the issue persists, you might need to add custom code in your function app to ensure the data is sent in the correct format. For example, you can use JSON.stringify() to convert the array to a JSON string before sending it to EventHub.
    4. Check the connection string for the EventHub trigger. Make sure it is correct and has the necessary permissions to read messages from the EventHub.
    5. Check the logs for the function app and the logic app to see if there are any errors or warnings related to the EventHub trigger.

    Hope this helps. Please let us know if you have any further questions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.