Skip to content

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

@esanchezros

Description

@esanchezros

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions