[MDO] Fix empty subject by sorting on the first to last message and get first one (oldest should be the original)#2218
Conversation
rosspa05
left a comment
There was a problem hiding this comment.
Tested, reviewed, and discussed. Looks good.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Discussed, tested, and reviewed. Looks better. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
|
||
| if (-not $IncludeDuplicates) { | ||
| [array]$failedMessages = $failedMessages | Sort-Object MessageId -Unique | ||
| [array]$failedMessages = $failedMessages | Group-Object -Property MessageId | ForEach-Object { $_.Group | Sort-Object -Property Received | Select-Object -First 1 } |
There was a problem hiding this comment.
How does this address empty subjects?
There was a problem hiding this comment.
It looks an issue with Get-MessageTrace:
for all original messages it is able to get subject, but for some resend messages is not able.
With this we will get the oldest one, the original with that messageId
There was a problem hiding this comment.
Would it be better to include a where statement when the subject isn't null?
There was a problem hiding this comment.
I though that but if the original message is null, it will not work
There was a problem hiding this comment.
We talking about original message subject or original message MessageId
|
Looks like the build pipeline is having an issue with checking out your branch. Not sure if this is due to the close or not. |
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Got the pipeline to work after the merge. |
Issue:
If you have more that one copy in message trace not always shows subject
Reason:
With the current filter we do not take always the original one, the oldest one.
Fix:
Fix empty subject by sorting on the first to last message and get first one (oldest should be the original and has the original subject)
Validation:
Check it in lab