Our approach is a bit different. Our logic is completely decoupled which
allows us simply to run multiple instances of the same process having
different ports. Could this perhaps be a valid solution for you?
PS @ Laurent - is there any reason why you don't use the
ca.uhn.hl7v2.llp.ExtendedMinLowerLayerProtocol
instead of ca.uhn.hl7v2.llp.LowerLayerProtocol? - and dependent of your
data provider, you should might also considering using
ca.uhn.hl7v2.validation.impl.DefaultValidationWithoutTN
instead of NoValidation.
2012/12/18 LDH <l...@360fresh.com>
> Our issue is a bit different. We used to process an aggregated feed, so
> we have smart logic that can already process a variety of feeds
> intelligently with our handler. Running 2 instances of the server would
> work but would not perform well enough as we do not have a multi-process
> caching strategy for example.
>
> We were hoping that HAPI had some facility to do something like:
>
> Application handler = new HL7ListenerApp(Con);
> LowerLayerProtocol llp = LowerLayerProtocol.makeLLP(); // The
> transport protocol
> PipeParser parser = new PipeParser(new
> CanonicalModelClassFactory("2.6")); // The message parser
> parser.setValidationContext(new NoValidation());
> HL7Listener = new SimpleServer(PORT1, llp, parser);
>
> HL7Listener.registerApplication("*", "*", handler);
> HL7Listener.start();
> HL7Listener = new SimpleServer(PORT2, llp, parser);
>
> HL7Listener.registerApplication("*", "*", handler);
> HL7Listener.start();
>
> This just looks nasty and dangerous :) Our HL7ListenerApp is threadsafe,
> but we couldn't see documentation that could either support such a setup or
> not. Ultimately, it would be interesting if this were supported in HAPI.
> The better way may be:
>
> HL7Listener = new SimpleServer(PORT1, llp, parser);
> HL7Listener.addPort(PORT2);
> HL7Listener.registerApplication("*", "*", handler);
> HL7Listener.start();
>
> I have seen a lot of setups where Mirth would be used as a front end
> purely to do message aggregation. Wondering how complex it would be to
> actually do at the level of the framework itself so an app could aggregate
> multiple feeds in a threadsafe way to a single handler.
>
> Makes sense?
>
>
>
>
> Thank you,
> ------------------------------
> *Laurent Hasson*
> Co-Founder, 360Fresh.com
> Cellphone: 646-283-2186
> This email and any attachments thereto may contain private, confidential,
> and privileged material for the sole use of the intended recipient. Any
> review, copying, or distribution of this email (or any attachments thereto)
> by others is strictly prohibited. If you are not the intended recipient,
> please contact the sender immediately and permanently delete the original
> and any copies of this email and any attachments thereto.
>
> On 12/17/2012 15:58, Ian Vowles wrote:
>
> We have written several programs which implement simple server on
> different ports and run them separately. This enables us to log each feed
> and stop/start them individually when required. Whilst it can mean you end
> up with quite a few processes running, it has proved an effective technique.
>
> Ian
>
>
> >>> Brijesh Singh
> >>> <contact.brije...@gmail.com><contact.brije...@gmail.com>18/12/12 4:14 >>>
> Hi - As per HAPI documentation, messages can be processed through HAPI
> using *SimpleServer *on a port. We have a requirement where data coming
> from different feeds to our application on different ports. Does HAPI
> provide API to handle incoming messages on different ports? All these feeds
> are inbound to our interface. For example, we would like to listen to ADT
> feed on port 8080 and ORU feed on 8081?
>
> Is it possible to handle using HAPI? or Please suggest any alternate
> strategy we can use to handle multiple ports for different inbound feeds?
>
> *SimpleServer HL7Listener = new SimpleServer(PORT, llp, parser);**
> **HL7Listener.registerApplication("*", "*", handler);**
> **HL7Listener.start();**
> *
> Cheers,
> Brijesh
>
>
> ********************************************************************************
>
> This email, including any attachments sent with it, is confidential and
> for the sole use of the intended recipient(s). This confidentiality is not
> waived or lost, if you receive it and you are not the intended
> recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of
> this email is strictly prohibited. The information contained in this email,
> including any attachment sent with it, may be subject to a statutory duty
> of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this
> email in error, you are asked to immediately notify the sender by telephone
> collect on Australia +61 1800 198 175 or by return email. You should also
> delete this email, and any copies, from your computer system network and
> destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute
> or take any action(s) that relies on it; any form of disclosure,
> modification, distribution and/or publication of this email is also
> prohibited.
>
> Although Queensland Health takes all reasonable steps to ensure this email
> does not contain malicious software, Queensland Health does not accept
> responsibility for the consequences if any person's computer inadvertently
> suffers any disruption to services, loss of information, harm or is
> infected with a virus, other malicious computer programme or code that may
> occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the
> sender and not the views of the Queensland Government.
>
>
> **********************************************************************************
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue
> delivershttp://p.sf.net/sfu/logmein_12329d2d
>
>
>
> _______________________________________________
> Hl7api-devel mailing
> listHl7api-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
--
Med venlig hilsen / Kind regards
Jens Kristian Villadsen
cand.polyt
Systemudvikler / System developer
IM (Skype): j.kidd.o
Cetrea A/S, Denmark
phone : +45 38 40 05 81
address: Brendstrupgårdsvej 21F, DK-8200 Aarhus N.
e-mail : j...@cetrea.com
w^3 : http://www.cetrea.com/
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel