Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ Connector does unnecessary message unsescape action. #2730

Closed
Zapolski opened this issue Jun 7, 2024 · 7 comments · Fixed by #2778
Closed

RabbitMQ Connector does unnecessary message unsescape action. #2730

Zapolski opened this issue Jun 7, 2024 · 7 comments · Fixed by #2778
Assignees
Labels
component:qa Task containing all details related to QA kind:bug Something isn't working

Comments

@Zapolski
Copy link

Zapolski commented Jun 7, 2024

Describe the Bug

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. Connector’s source code contains logic with unescaping json.

Steps to Reproduce

  1. Prepare message object for sending by RabbitMQ connector. Object must contain field with escaped symbols. For example:
{
   "data": {
       "company": "LTD \"Three bears\""
   }
}
  1. Use RabbitMQ connector for sending message.

Expected Behavior

I expect the same message in my RabbitMQ CONSUMER, message should be without any transformation.

Environment

  • OS: [Linux Ubuntu]
  • Library version: [RabbitMQ Connector io.camunda.connectors.RabbitMQ.v1 version 5]
  • Camunda version: [e.g. 8.4. (self-managed)]

Camunda 8 forum topic

@Zapolski Zapolski added the kind:bug Something isn't working label Jun 7, 2024
@sbuettner
Copy link
Contributor

As discussed in our team meeting we will remove unnecessary unescaping from Connectors in the next alpha.

@mathias-vandaele mathias-vandaele self-assigned this Jun 20, 2024
@mathias-vandaele
Copy link
Contributor

After testing, removing .map(StringEscapeUtils::unescapeJson) L65 io.camunda.connector.rabbitmq.outbound.MessageUtil corrects the issue.
I am not so sure about removing it as it might have been added for a valid reason, any thoughts @sbuettner ?

@johnBgood
Copy link
Contributor

I'm posting the forum comment I made here for visibility:

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.

The way I see it, we might remove any unescaping (not only in the RabbitMQ connector), but let's wait for @sbuettner or @chillleader opinions.

@chillleader
Copy link
Member

Right, that Zeebe issue was the reason we added it there. If the escaping issues are gone, we no longer need the workaround.

@mathias-vandaele
Copy link
Contributor

@chillleader Should I make an update and modify it in every connector ?

@chillleader
Copy link
Member

chillleader commented Jun 21, 2024

Yes please - although I imagine there might be some corner cases where we might decide to keep unescaping for certain reasons (or maybe not, let's see during the review 🙂). But in general I think we should remove it from all connectors now.

@sbuettner
Copy link
Contributor

sbuettner commented Jun 24, 2024

Yes, lets remove unnecessary escaping but not backport it as previous zeebe releases faced this issue.

@mathias-vandaele mathias-vandaele added the component:qa Task containing all details related to QA label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:qa Task containing all details related to QA kind:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants