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

Add method to add a secondary destination in BaseMessage #89

Open
whichwit opened this issue Nov 21, 2024 · 1 comment
Open

Add method to add a secondary destination in BaseMessage #89

whichwit opened this issue Nov 21, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@whichwit
Copy link
Collaborator

Request from Aihua T. (UT):

I would like a method to add a second destination in BaseMessage. The existing method:

public void setMessageDestination(String value) {
  messageHeader.getDestination().clear();
  MessageHeader.MessageDestinationComponent dest = new MessageHeader.MessageDestinationComponent();
  dest.setEndpoint(value);
  messageHeader.getDestination().add(dest);
}
@whichwit whichwit added the enhancement New feature or request label Nov 21, 2024
@whichwit whichwit self-assigned this Nov 21, 2024
@MikeRileyGTRI
Copy link
Collaborator

MikeRileyGTRI commented Nov 21, 2024

Is this a reasonable ask? Surely you can do something akin to...

messageheader.getDestination().add(new MessageDestinationComponent(value));

and writing a function to do one line is often a bad-smell.

The overriding setter is just a guardrail for useability but if they need a 2nd destination using the components as HAPI intended would be a reasonable expectation of an implementor.

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

No branches or pull requests

2 participants