RabbitMQ Connector Unescape json inside connector.

Hi, everyone.
I use out-of-the-box RabbitMQ Connector. Message for sending contains string fields with escaped symbols, like:

{
   "data": {
       "company": "LTD \"Three bears\""
   }
}

Connector sends my message but consumer receives wrong message and fells with MessageConversionException. There’s a message which consumer receives:

{
   "data": {
       "company": "LTD "Three bears""
   }
}

All symbols '\' disappeared.
In the connector’s source code I found logic with unescaping json: connectors/connectors/rabbitmq/src/main/java/io/camunda/connector/rabbitmq/outbound/MessageUtil.java at 9d0028b36c1cd6b043f03dc82b17e2e6da006785 · camunda/connectors · GitHub

Is this correct connector’s behavior or it’s a bug after fixing for example the next issue fix: string escape characters by nicpuppa · Pull Request #750 · camunda/feel-scala · GitHub

Hi @zapolski.siarhei !

First of all welcome to the Camunda community and thank you for posting your question here :slight_smile:

Regarding your issue, did you try:

{
   "data": {
       "company": "LTD \\\"Three bears\\\""
   }
}

Could tell me if it helped?

Thank you

@jroques hi, thank you for response

Yes, it works well:

{
   "data": {
       "company": "LTD \\\"Three bears\\\""
   }
}

Also I found workaround: before sending message I convert object with message to json-string with escaping and I get like this:

{
   \"data\": {
       \"company\": \"LTD \\\"Three bears\\\""
   }
}

and it also works well.

But I need a separate service task for this converting.
I see this action like “crutch” and it takes a lot of additional efforts.

I don’t understand why connector needs this unscaped code?
Or maybe there’s a more efficient way to send a correct message to the connector?

It is due to Zeebe escaping characters.

Looking at this ticket, it seems that it might be resolved. If so, we will remove the unescapes in our connectors.

Thanks for pointing this out.

This looks like a resolved issue.
Should I start a new issue for RabbitMQ connector on Github?
Or how can I trace this fix?

Exactly, please create a new issue here so that you can follow the progress.

Thank you!

@jroques thank you for your help.
I’ve created issue: RabbitMQ Connector does unnecessary message unsescape action. · Issue #2730 · camunda/connectors · GitHub.
Best regards.