Hi christian;
Thanks for your quick and clear response;
One more question;

"Often, messages are sent in a fire-and-forget mode, and clients are only
maybe interested if the message has been received rather than how they are
processed and what the result is. "

I have written myclient like this;

Initiator initiator = connection.getInitiator();
        HL7Message sampleMessage = new HL7Message();

      Message response =
initiator.sendAndReceive(sampleMessage.getHL7Message());

Here i use "Initiator" to send messages. There, i dont see "fire and
forgot" kind operation to send messages..AM i missing anything?

My client always wait for ack/nack msesge..


tahnks

-ratha




On 23 April 2013 16:29, Christian Ohr <christian....@gmail.com> wrote:

> In the processMessage method, you can run any business logic _before_ you
> generate and return an acknowledgement (the ca.uhn.hl7v2.model.Message
> class defines a number of generateAck methods, that return an customizable
> ACK message).
> HAPI does not dictate if you return a type of  Accept-Acknowledgement (and
> further process the message in a different thread afterwards) or an
> Application-Acknowledgement (which happens at the end of processing the
> incoming message). Take care that if processing the message takes
> potentially long, you keep your client waiting and eventually time out.
>
> An important question is how you expect your client(s) to react on
> negative acknowledgements, and if the clients are able to fulfill your
> expectations. Often, messages are sent in a fire-and-forget mode, and
> clients are only maybe interested if the message has been received rather
> than how they are processed and what the result is. Of course, this is
> different with query messages, but here you usually don't send back an ACK
> but rather a full response message.
>
> Hope this helps
> Christian
>
>
> 2013/4/23 vijayaratha vijayasingam <vijayara...@gmail.com>
>
>>   Hi all;
>>
>> Im new to HL7 technology, bear me if im wrong..
>>
>> Currently i can send and receive auto ack/nack message  from client.
>>
>> My client is like this;
>>
>> Initiator initiator = connection.getInitiator();
>>         HL7Message sampleMessage = new HL7Message();
>>
>>         //send
>>         Message response = 
>> initiator.sendAndReceive(sampleMessage.getHL7Message());
>>
>> My messageprocessor implements the 'Application' and it receives the request 
>> from the client successfully and sending back the ack/nack message. But i 
>> would like to control this from my application, where i forward the request 
>> to an service endpoint and based on that service endpoint's response i would 
>> like to send back an ACK message to the client..
>>
>> My processor is like;
>>
>> public class HL7MessageProcessor implements Application {
>>
>>
>>  public Message processMessage(Message message) throws ApplicationException, 
>> HL7Exception {
>>
>> return handleHL7Result(hl7Msg);
>>
>> }
>>
>>
>> handleHL7Result(hl7Msg){
>>
>> //creates ack/nack message
>>
>> return message
>>
>> }
>>
>> }
>>
>> Is my assumption right?..how can i handle this? seems, my application has to 
>> return a message soon after it received the request. After sending the auto 
>> ack message, my other processes looks meaning less..(ie: sending to a 
>> service endpoint , retrieving response etc..)
>>
>> Can anybody help me on this? Any guide will be much appreciated
>>
>>
>>
>>
>> Thanks
>>
>> -Ratha
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Try New Relic Now & We'll Send You this Cool Shirt
>> New Relic is the only SaaS-based application performance monitoring
>> service
>> that delivers powerful full stack analytics. Optimize and monitor your
>> browser, app, & servers with just a few lines of code. Try New Relic
>> and get this awesome Nerd Life shirt!
>> http://p.sf.net/sfu/newrelic_d2d_apr
>> _______________________________________________
>> Hl7api-devel mailing list
>> Hl7api-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>
>>
>
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to