Read Consumer response object from broker in function app

MD Abu Saleh
MD Abu Saleh Member Posts: 1


We have an Event driven app which publish a payload to a topic in solace broker from Azure function app. There is a consumer which is of REST endpoint. Once the message is delivered and processed by consumer, they send a 200 OK with an object

`{"message": "SUCCESS"}` .

We want to read this response object from the caller Function app. How do we achieve this uising C#.

I have tried session.SendRequest() which has an "out" response of type IMessage. I am trying to read it. But it's blank everytime.

Any suggestion or help would be appreciated.


  • marc
    marc Member, Administrator, Moderator, Employee Posts: 814 admin

    Hi @MD Abu Saleh,

    Can you take a look at the C# Request/Reply tutorial and see if it helps: ? Make sure to check out the "Receiving the Reply" section. It sounds like you're close already!

    Hope that helps!

  • Aaron
    Aaron Member, Moderator, Employee Posts: 466 Solace Employee

    @MD Abu Saleh, did you manage to get this working? So your REST endpoint is receiving the message from a Solace RDP that is listening on the topic that your C# app is publishing onto? And your sendRequest() is receiving a reply, but it's blank?

    If you have access to the broker, you could "snoop" the messages going across it between your C# requestor and your REST responder. Just use the Try Me! subscriber (or SdkPerf, or any subscriber) and add subscriptions for > and #P2P/> and it should show you both the request and response. To verify that the backend REST service is actually responding properly.

    Let us know.