🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Set ApplicationMessageType via REST API?
I rely on the ApplicationMessageType property to map received events back to the POCOs that they were generated from. I am publishing events from a Blazor WASM application, and can't use the SolaceSystems NuGet package since it won't run in a WASM environment. Thus, I'm using an HttpClient with the REST API. I've looked through the API documentation for the ApplicationMessageType message property, but I can't see how to set this property via HTTP headers or otherwise. Can someone please point me in the right direction?
Best Answer
-
Hey @ofgirichardsonb . Unfortunately that's one of the message headers you can't set with REST. It's too bad we don't have parity across all our APIs and protocols. Couple options:
- Use another header (HTTP Content Type or Content Encoding) https://docs.solace.com/API-Developer-Online-Ref-Documentation/net/html/5e3fb3cf-9bf0-04ea-896f-0bc7c9a30848.htm
- Maybe a User Property instead?
I don't know much about WASM or Blazor or anything, but maybe there's other messaging libraries you could try, might give you better performance than REST?
0
Answers
-
Hey @ofgirichardsonb . Unfortunately that's one of the message headers you can't set with REST. It's too bad we don't have parity across all our APIs and protocols. Couple options:
- Use another header (HTTP Content Type or Content Encoding) https://docs.solace.com/API-Developer-Online-Ref-Documentation/net/html/5e3fb3cf-9bf0-04ea-896f-0bc7c9a30848.htm
- Maybe a User Property instead?
I don't know much about WASM or Blazor or anything, but maybe there's other messaging libraries you could try, might give you better performance than REST?
0 -
Hello @Aaron ,
Thank you for the ideas and links. I ended up simply creating a thin API layer that uses the TCPS protocol instead. It seems to be fast enough, though the AMQP/MQTT idea from WASM itself sounds interesting and I'll try it out when I get a chance.
0