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

GetJMSCorrelationID Why encode as hex? #66

Open
ftcopilot058 opened this issue Apr 23, 2024 · 3 comments
Open

GetJMSCorrelationID Why encode as hex? #66

ftcopilot058 opened this issue Apr 23, 2024 · 3 comments

Comments

@ftcopilot058
Copy link

ftcopilot058 commented Apr 23, 2024

Why encode GetJMSCorrelationID as hex instead of returning the correlationid to the user as is?
@matrober-uk

@matrober-uk
Copy link
Member

Hi @ftcopilot058 - thanks for your question.

The approach of encoding the CorrelationID as hex is to maintain consistency with the approach that is taken by the MQ JMS client.

@ftcopilot058
Copy link
Author

Hi @ftcopilot058 - thanks for your question.

The approach of encoding the CorrelationID as hex is to maintain consistency with the approach that is taken by the MQ JMS client.

Can you provide a way to get the original correlation id?

@matrober-uk
Copy link
Member

Hi @ftcopilot058 - please can you give an/some examples of the type of correlation ID that you are passing to SetJMSCorrelationID, and the string that you get back from GetJMSCorrelationID?

There are some examples in the getbycorrelid_test.go (at the link below) that show text strings being round-tripped successfully (limited to the first 12 characters, which is due to the 24 byte size of the internal MD Message Descriptor (MQMD) header field used to store the correlID when it is sent)
https://github.com/ibm-messaging/mq-golang-jms20/blob/main/getbycorrelid_test.go#L281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants