Question
Salma Sarwar · Jun 12, 2020

Message Queues

Hi

 

I was experiencing an issue yesterday where I had over 900 messages in the queue. I had to filter and delete only A31 messages out of the queue allowing the rest of them to be processed.  I tried to use SQL to set the status of the message to 'Suspended' however the A31 messages still remained on the queue and I had to suspend manually by going through each message.  Is there a way of Suspending or Aborting only certain type of messages in a queue.  I started with a SQL statement even though the status gets updated to suspended the message remains in the queue tab, how do I remove the message from the queue?  Thank you for your help.

update 
Ens.MessageHeader
Set Status ='Suspended' WHERE ID =(
SELECT
Ens.MessageHeader.ID
FROM Ens.MessageHeader inner join EnsLib_HL7.Message

on EnsLib_HL7.Message.ID=
Ens.MessageHeader.MessageBodyId 
WHERE 
Ens.MessageHeader.TargetConfigName ='Operation_Name' and 
EnsLib_HL7.Message.name ='ADT_A31' and Ens.MessageHeader.Status='Queued')

 

Kind Regards,

 

Salma

0
0 504
Discussion (2)2
Log in or sign up to continue

Check AbortMessage method here.

First query your messages to  find the correct id set and after that call AbortMessage for each header.

The reason SQL did not work is that your messages are enqueued.

Hi

Thank  you so much for your help I will be looking to test this AbortMessage and I will get back to about my results :)  Thanks for pointing me in the right direction.

Kind Regards,

Salma