If I recall correctly a singleton is a class that is available across the entire jvm, so if you intend it to handle all messages from lots of queues, I'd think it might quickly become a bottleneck for messaging. No expert in this but, from an integration perspective it would be more scalable and better from the perspective of different services stopping and starting for various reasons to be individually controllable like you can in most IE platforms. Don't know what your platform is or anything though.
S Stewart Anderson Integration Consultant P: +44 20 3982 6826 M: +44 77 7999 6873 W: servita.com<https://www.servita.com> [cid:image001.png@01DA5A9B.5A32F290]<https://www.linkedin.com/company/servita/> [cid:image002.png@01DA5A9B.5A32F290] The Smiths Building, 179 Great Portland Street, London, W1W 5PL From: Thomas, Patrick R via Hl7api-devel <hl7api-devel@lists.sourceforge.net> Sent: Thursday, February 8, 2024 1:54 PM To: hl7api-devel@lists.sourceforge.net Subject: Re: [HAPI-devel] Thread Safe Queue for HL7 messages CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe. I have a follow-up question. The documentation says that HapiContext is not intended to be a singleton. Should it be fine to create one HapiContext in the singleton that I create to handle the incoming messages from my queue? It seems very inefficient to recreate the objects I need to send each message. Thank you. ______________________________________________________________________ The contents of this message, together with any attachments, are intended only for the use of the person(s) to which they are addressed and may contain confidential and/or privileged information. Further, any medical information herein is confidential and protected by law. It is unlawful for unauthorized persons to use, review, copy, disclose, or disseminate confidential medical information. If you are not the intended recipient, immediately advise the sender and delete this message and any attachments. Any distribution, or copying of this message, or any attachment, is prohibited.
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel