Hi,

202 as response for one-way is designed. The idea is that client thread must 
not wait for the response, it is asynchronous communication.
There are three ways to implement this requirement:
1) use WS-Addressing and WSA-ReplyTo header
2) use two independent one-way calls
3) use native async transport JMX

I described some details of this in http://ashakirin-cxf-async.blogspot.com/

Regards,
Andrei.

-----Original Message-----
From: Henning Blohm <[email protected]>
Sent: Montag, 10. Juni 2019 12:40
To: [email protected]
Subject: Robust Asynchronous Message Exchange using WS-Addressing


Warning! External email. Exercise caution when opening attachments or clicking 
any links.


Hello CXF users,

I would like to ask for some advise on how to handle a robust asynchronous 
message exchange using WS-Addressing and CXF.

So system A sends a message to system B for processing, and if B accepts the 
message, system A will receive some later callback from B conveying some 
information on how processing of the message worked out.

It should be possible for B to check on correctness of the message and B should 
be able to setup whatever is needed for later (e.g. commit some data to a 
database, put something into some queue) before it confirms submission of 
message.

For non-technical reasons I would like to use WS-Addressing to communicate the 
callback address.

I tried two approaches:

a) A One-Way service.

In that case, I noticed, CXF already returns an HTTP 202 (Accepted) reply 
before the application has any chance to get its hands on the message.
I found no (harmless) way to have CXF wait for the application to check and 
really "accept" the message.

I would really like to be able to validate the incoming message and safely put 
it in a processing queue before replying with a 202 response.

Is that possible?


b) A Two-Way service with (empty) response message (even if no content)

In that case, using WS-Addressing CXF sends an empty SOAP response to the 
replyTo address on its own with a new request after the method call completed.

I would really like to be able to synchronously reply with a simple message 
indicating whether submission was successful and if so, send a more detailed 
processing message to the replyTo callback when processing is done.

Is that possible?


So, in essence, I would like to use WS-Addressing to specify a callback address 
and return some simple response synchronously for the incoming call while using 
the callback address for a more detailed callback later.

Would one of the two approaches above work or should I follow some other 
direction.

Thanks,
Henning
As a recipient of an email from Talend, your contact personal data will be on 
our systems. Please see our contacts privacy notice at Talend, Inc. 
<https://www.talend.com/contacts-privacy-policy/>


Reply via email to