web stats
Question Message Queues - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Thread Tools Display Modes
Old 12-12-2017, 10:11 AM
kirt kirt is offline
Mirth Newb
Join Date: Feb 2016
Location: Quebec City
Posts: 10
kirt is on a distinguished road
Default Question Message Queues

Mirth Version:

I have a question concerning message queues.

Relevant background: I once encountered a situation in a test environment where I paused an outbound message connector on a Friday afternoon and forgot to reactivate it before logging off for the weekend. On the following Monday, I encountered and out-of-memory error. I believe it was related to consumption of the heap space; at the time 512MB was allocated. This message stream was just regular HL7 traffic - ADT, ORM, ORU.

I am trying to avoid a similar situation in production.

Current Question: I am using Mirth Connect to distribute messages to 4 separate recipients. One has a planned downtime which could see 20 to 30 thousand messages build up over 3-4 hours.

Is there a relationship between the "Server Memory (mb)" setting and the volume of messages I can safely queue?

Is there a difference or noteworthy advantage between permitting the messages to simply queue versus pausing the message stream?

Thanks in advance,
Reply With Quote
Old 12-13-2017, 07:22 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road

Each queue has a "buffer size" that can be configured per-connector. By default it's 1000, which means up to a thousand messages may remain in-memory at any given point in time.

Note, that is not a cap on the number of allowed queued messages. You can queue millions of messages just fine, and they'll all reside in the database. But the maximum number that remain in-memory while your queue is chugging through messages is set by the queue buffer size.

For smaller messages the default of 1000 is usually fine. But if you have a channel that processes very large (multiple MB) messages then you may want to consider dialing down the queue buffer sizes on that channel.

You could also consider increasing the server max heap size if you need to.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote
Old 10-26-2018, 08:16 PM
khobbs khobbs is offline
Mirth Newb
Join Date: May 2016
Posts: 11
khobbs is on a distinguished road

> "For smaller messages the default of 1000 is usually fine."

We were having some memory constraints and dialed most of our channels back from 1000, way down. In most cases down to match the number of Queue Threads. But, I'm wondering if that might be hindering performance. Would it be generally be better to have more Queue Buffer Size than Queue Threads? At least twice as many, 5x ?
Reply With Quote

hl7 message queue pause

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 03:59 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation