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

Be able to send a raw message without removing any field #394

Closed
esanchezros opened this issue May 14, 2021 · 2 comments · Fixed by #395
Closed

Be able to send a raw message without removing any field #394

esanchezros opened this issue May 14, 2021 · 2 comments · Fixed by #395

Comments

@esanchezros
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I have a use case where one of our services need to propagate PossDupFlag and OrigSendingTime to a third party. Using Session.send makes this impossible as these fields are removed from the message header.

Describe the solution you'd like
It will be great to have an overloaded method that will allow sending the message as-is without removing any field. Something like:

public boolean send(Message message, boolean sendRaw);

Describe alternatives you've considered
Alternatively, sendRaw method can be made public in Session. At the moment I have to use reflection to invoke sendRaw which is pretty hacky:

Method method = targetSession.getClass().getDeclaredMethod("sendRaw", Message.class, int.class);
method.setAccessible(true);
if (!(boolean) method.invoke(targetSession, message, 0)) {  

Or fork the project and maintain a patch version in our dependency management server.

@chrjohn
Copy link
Member

chrjohn commented May 14, 2021

Looks a little like #236 but that PR still needs some love. ;)

@esanchezros
Copy link
Contributor Author

Thanks @chrjohn I will continue the conversation on that ticket.

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

Successfully merging a pull request may close this issue.

2 participants