· Oct 19, 2017

Process Single Messages from Queue

I was wondering if anyone has a good way to process individual messages from a queue. I run into this fairly often where I have test data coming in that I am queuing at the disabled business process, while I am working on the DTL or class to process the messages. What I would like to do is be able to send one message through to see the effects of my changes. What happens is I turn the business process back on and all of my test data goes through the current DLT/class set up. If anyone has any insight it would be greatly appreciated.


Discussion (5)0
Log in or sign up to continue

For your testing purposes, are you looking to simply examine the output of the transformation or do you need to have the message continue to its destination?

You can select messages by Header ID or Body ID for transformation via the Ensemble / Interoperate / HL7 v2.x / HL7 v2.x Message Viewer facility and examine the transformed output in HTML-ized form.

Alternately, you can execute the DTL in the terminal against a message object you've opened by Body ID and write the output to a file for viewing in an external application:

ISYSDEV>set imsg=##class(EnsLib.HL7.Message).%OpenId(1668896)
ISYSDEV>set sc=##class(RegADT.ADTtoCMSDtl).Transform(imsg,.omsg)
ISYSDEV>do omsg.OutputToFile("/home/jdrumm/tmp/zzzfile.hl7")

This doesn't have the effect of releasing anything from the queue; the messages are all still there waiting to be processed by the BP.

You can also test Data transformations from within the Data Transformation Editor, if you have the message as text.

There is no direct way (without writing something) to get 1 message through.

An indirect way would be use the throttle delay option for the Business Service, Business Process(es)/Router(s) & Business Operations in Ensemble via the Settings tab in the Additional Settings section.

It works in the Milliseconds (1000 milliseconds = 1 second) , so to get one message through with enough time to stop the feed you would set it to 60,000 milliseconds.

We used this to assurance test each of our feeds on the day when upgrading to Healthshare 2017.1

I hope this helps you.

PS you would need to remember to remove this throttle after testing, otherwise in a production environment you would have queues galore.