Sending Messages on the Top of Queue

Answers

While messages do have priority, it seems to be internal property. You can try to check it on a dev system but I'd advise against changing it on a production system.

 

The easiest way is to have two operations - one for priority source, another for everything else and route messages to one or another operation.

Eduard, are you referring to the Priority property of the Ens.MessageHeader class? That seems to be used exclusively for marking the message for Async vs. Synchronous delivery.

The need for message prioritization within a single message flow (one that would otherwise be FIFO) is valid and has been addressed in other integration products. One healthcare use case that I've encountered in multiple implementations is that the downstream system uses a session-oriented connection ("always on" MLLP) and receives both ADT and lab orders over the same connection. As the patient demographic data and "stat" lab orders should always be prioritized over routine order messages, a "high" priority value would be set for those messages during in-engine routing/transformation processing and would be a primary selection criteria for the process (eWay/Connection Point/Communication Client) to deliver it to the receiving system.

Given modern hardware and software, latency caused by the integration engine itself is rarely an issue. However, not all applications can receive messages as fast as integration engines can send them ...

Eduard, are you referring to the Priority property of the Ens.MessageHeader class?

Yes.

That seems to be used exclusively for marking the message for Async vs. Synchronous delivery.

These priorities are available:

#define eMessagePriorityHighSync 1
#define eMessagePrioritySync     2
#define eMessagePrioritySimSync  4
#define eMessagePriorityAsync    6

Sync by default is 2, so specifying priority 1 may indeed help. Cursory glance at Ens.Queue indicates that messages with priority 1 would be processed first.

Comments

Birun, 

Are you asking for a one time solution or a permanent solution to continuously place certain messages at the head of a queue?

Right now one time.. we need to resend few thousands messages into existing IP/port without disturbing the current flow..if there is a way then it would also help as permanent solution as well..

I have previously used the "Resubmit at head of queue" checkbox in the Resend Messages screen to get that amount of messages sent at the front of a queue. Not great for a permanent solution, but Eduard already gave a good option for that.

It's actually a wrapper for the same idea - if HeadOfQueue is checked, the resend message is inserted with a higher priority than the highest priority existing queue message. It can be seen in EnQueue method of Ens.Queue class.