Hello all,

 

I am using Jetty HttpClient to post messages to a messaging platform
(Messenger). I am observing that sometimes when sending 2 messages one after
the other (sent by the same thread just one after the other), the second
message arrives on the messaging platform before the first. 

I am using non-blocking method where 'url' is the same URL for both send:

 

Request request =
httpClient.newRequest(url).method(HttpMethod.POST).content(..);

Request.send(new BufferingResponseListener(1024) {

                @Override

                public void onComplete(Result result) {.});

 

Is this behavior normal ? How could I be sure that the first connection
created by the first send will be reused by the second send ?

If not possible, should I use a mechanism that would queue the requests and
send them with the blocking method?

 

Thanks for your help.

 

Bruno

 

_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to