Using NodeJS to "eavesdrop" on Microgateway messages

joh
joh Member Posts: 2

Hi there,

I have a Microgateway set-up and I'm trying to eavesdrop/ audit messages using NodeJS but I'm encountering some apparent limitations with the API.
How is it possible for me to access HTTP Content-Type, Content-Encoding, Accept-Encoding headers using NodeJS?
It's common for REST payload to be encoded using gzip, br, etc but I'm not able to tell without having access to those headers.
I note that .NET API doesn't have this issue as the Message exposes the following properties:message.HttpContentEncoding & message.HttpContentType

Am I missing something in the Javascript API? Thanks!

Tagged:

Best Answer

  • [Deleted User]
    [Deleted User] Posts: 0 ✭✭
    #2 Answer ✓

    Hey @joh, sorry I was mistaken. These properties are omitted in the NodeJS objects and there's an open bug against this issue internally. If you're doing work for a Solace customer I'd like to log your ask officially, as it might weigh into the bug's prioritization. You can message me directly with that information if you'd like. Thanks for drawing attention to this.

Answers

  • joh
    joh Member Posts: 2

    Thanks Andrew. I just went through it but it didn't answer my question.

    "HTTP content encoding" was not mentioned therein and I've tried to retrieve it using the user properties map to no avail. When I did a full dump on the Message using NodeJS, I'm not able to see it in user properties map either.

    Is this a limitation with the NodeJS API? Thanks

  • [Deleted User]
    [Deleted User] Posts: 0 ✭✭
    #5 Answer ✓

    Hey @joh, sorry I was mistaken. These properties are omitted in the NodeJS objects and there's an open bug against this issue internally. If you're doing work for a Solace customer I'd like to log your ask officially, as it might weigh into the bug's prioritization. You can message me directly with that information if you'd like. Thanks for drawing attention to this.