Hi @theironcook …! Welcome to the community. For my lack of understanding, can you elaborate a bit more? Do you need to change the payload encoding itself, or do you need to set the “content type” header to application/x-www-form-urlencoded > and the rest stays the same?
If the former, Solace (the broker) doesn’t do payload transformation… you’ll need some intermediate microservice that does that… Spring Cloud Stream processor app or iPaaS or something. Not hard to do/write, but not something built into the broker.
If the latter (payload already right format), you just need to set the Content Type of the webhook going out, then that’s not hard. In SolOS 9.11 which came out in Sept (2021), you can add additional headers to your outbound webhook for the RDP. Its actually part of the queue-binding configuration. Here are the CLI commands, change identifier names as appropriate.
enable
config
message-vpn default
rest
rest-delivery-point rdp1
queue-binding q/rdp1/1
create request-header content-type
header-vaue application/x-www-form-urlencoded
That’s it! Now when you send a message in Solace that lands on the queue for your RDP (q/rdp1/1
) in my case above, the message will have that additional HTTP header set to the backend REST service:
Received message: POST /OUTBOUND/ at 15:51:52
HEAD:host = 172.19.4.248:9999
HEAD:solace-aaron-custom =
HEAD:cache-control = no-cache
HEAD:content-length = 5
HEAD:content-type = application/x-www-form-urlencoded
HEAD:solace-delivery-mode = Persistent
HEAD:user-agent = Solace_PubSub+_Standard/9.12.0.15
BODY: hello
You can also set this in the GUI PubSub+Manager, under Clients->REST->Queue Bindings:
Hope that helps!