Hi Eric,

Please see my comments below.

On 7/12/06, Eric Winter <[EMAIL PROTECTED]> wrote:
Reliable Notification

I have a pretty simple problem I'd like to solve, but the tool I think
I should use is not being cooperative.

I have a client that has to deliver a message to at least one server
within a reasonable time.

Based on that requirement I though I should use MEP InOnly and
Sandesha2 (Reliable Messaging).  The problem is that I need to know
that the message arrived and I can't seem to get that using Sandesha
and the InOnly pattern. All I really want from the service is an ACK
that I can pick up somehow at the client.  Clearly this is part and
parcel of what Sandesha does... I just want to know about it.


Acknowledgements are handled  inside Sandesha2 and they are not delivered to the client.  Sandesha2 will retransmit messages until  a ack is received or till the message sequence times out.

A couple of thoughts came up:
1. Manually check via the SequenceReport. (never see anything in the
Outgoing Sequence Report)

After you your messages get successfully delivered the the server and after the Sandesha2 client receive acknowledgements you should hv those message numbers in the outgoing sequence report. Dont you see these values? What are the velues of the other properties of the Sequence Report (for e.g. Sequece Status).
 

2. Use a SandeshaListener (callbacks for onError and onTimeout).  I
tried running client w/ server down. No luck.


This will not help ur scenario. You can only use this to know when your sequence times out.
 

3. SandeshaClient.waitUntilSequenceCompleted works but who wants to
block?  And if it does time out I still want to be notified.


yes. This will only help if blocking is ok.


None of these fullfill the basic requirement: within a reasonable
about of time, I want to know, at the client, that the message has
been received at the service.



FYI I am using the Sandesha2 UserguideEchoClient client - the code w/ my
additions are here.


        clientOptions.setTo(new EndpointReference (toEPR));
        ServiceClient serviceClient = new ServiceClient
(configContext,null);
        clientOptions.setAction("urn:wsrm:Ping");
        serviceClient.setOptions(clientOptions);


clientOptions.setProperty(SandeshaClientConstants.SANDESHA_LISTENER,
new SandeshaListener_Impl());//new
        clientOptions.setTimeOutInMilliSeconds(1);//trying to cause it
to timeout, but it doesn't.

        serviceClient.fireAndForget(getPingOMBlock("ping1"));
        serviceClient.fireAndForget(getPingOMBlock("ping2"));
        clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE,
"true");
        serviceClient.fireAndForget(getPingOMBlock("ping3"));


SandeshaClient.waitUntilSequenceCompleted(serviceClient,1000*50);//new
        serviceClient.finalizeInvoke();



My sugestion for you for now is to use the sequence report. May be from a seperate thread. But a better way will be to have a method in the SandeshaClient to notify the client when a specific message get successfully delivered. I'll mark this as a improvement :-)

Chamikara
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to