Skip to content

Commit

Permalink
Restructure the match-options identifying logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Aug 27, 2024
1 parent b26114c commit 20e7c2b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,12 @@ public static MQGetMessageOptions getMqGetMsgOptions(GetMessageOptions getMsgOpt
return mqGetMsgOptions;
}

if (Objects.nonNull(matchOptions.messageId())) {
if (Objects.nonNull(matchOptions.messageId()) && Objects.nonNull(matchOptions.correlationId())) {
mqGetMsgOptions.matchOptions = MQConstants.MQMO_MATCH_MSG_ID | MQConstants.MQMO_MATCH_CORREL_ID;
} else if (Objects.nonNull(matchOptions.messageId())) {
mqGetMsgOptions.matchOptions = MQConstants.MQMO_MATCH_MSG_ID;
}
if (Objects.nonNull(matchOptions.correlationId())) {
mqGetMsgOptions.matchOptions |= MQConstants.MQMO_MATCH_CORREL_ID;
} else if (Objects.nonNull(matchOptions.correlationId())){
mqGetMsgOptions.matchOptions = MQConstants.MQMO_MATCH_CORREL_ID;
}
return mqGetMsgOptions;
}
Expand Down

0 comments on commit 20e7c2b

Please sign in to comment.