[protobuf] Best solution to merge ByteStrings

2024-04-12 Thread Joan Balagueró
Hello, I have a protobuf like this in a ByteString variable 'cp': 1: { 1: 30 2: { 2: 100 } } And I also have another ByteString 'hotel' with this content: 1: 87354 2: { (...) a lot of content here } Now I need: 1. Put the 'hotel' ByteString under a "Hotels" tag with

[protobuf] Split 1 protobuf into N protobufs

2024-02-29 Thread Joan Balagueró
Hello, I'm new in protobuf, and I was wondering if the following is possible. I have a protobuf response coming from an api that contains a list of hotels. If we imagine this response in xml, it would be something as follows: H1H2 I need to split this into 2 pieces: H1 H2 Is it possible to

[protobuf] Re: Trying to rewrite a protobuf message but changing a couple of values

2023-09-20 Thread Joan Balagueró
#compiling-protocol-buffers > > Don't mess with the reflection API if you can avoid it. > > > On Wednesday, September 20, 2023 at 12:19:38 PM UTC+2 Joan Balagueró wrote: > >> Hi Florian, >> >> Not sure what I can do with this code. I only have a byte array >

[protobuf] Re: Trying to rewrite a protobuf message but changing a couple of values

2023-09-20 Thread Joan Balagueró
t; byte[] output = append(unmodifiedInputBytes, delta.toByteArray()); > > If the server expects a length delimiter you'd need to update it to the > new combined length. > > - Florian > > On Wednesday, September 20, 2023 at 11:03:46 AM UTC+2 Joan Balagueró wrote: > >>

[protobuf] Re: Trying to rewrite a protobuf message but changing a couple of values

2023-09-20 Thread Joan Balagueró
> > > > On Wednesday, September 20, 2023 at 10:19:07 AM UTC+2 Joan Balagueró wrote: > >> Hello, >> >> I have a protobuf message like this into a byte array: >> >> 1: { // META element >> 1: 2 >>

[protobuf] Trying to rewrite a protobuf message but changing a couple of values

2023-09-20 Thread Joan Balagueró
Hello, I have a protobuf message like this into a byte array: 1: { // META element 1: 2 2: 1 3: 1 4: {// CutOffTime element within META 1: 10 2: 3 } 5: 1 6:

[protobuf] Re: Streaming protobuf

2023-05-09 Thread Joan Balagueró
insField(CodedInputStream input, int fieldNumber) > throws IOException { > while (!input.isAtEnd()) { > int tag = input.readTag(); > if (WireFormat.getTagFieldNumber(tag) == fieldNumber) { > return true; > } > input.skipField(tag); > } > return false; > } >

[protobuf] Streaming protobuf

2023-05-09 Thread Joan Balagueró
Hello, I'm receiving protobuf messages from a client (I can't modify them in any way) with a list of hotels. There are hotels in the 90% of the times, but I need to differentitate when I receive hotels and when not. The proto file for "no hotels" is something like below (simplified): 1: { 1:

[protobuf] Missing field converting proto message from byte[] to "com.google.protobuf.Message"

2023-03-27 Thread Joan Balagueró
Hello everyone, I'm absolutely new to probuf. So this is my issue. We have implemented a proxy that receives a protobuf message as a byte array in a post message, and we only have to bypass this proto to the backend, receive the response (also in protobuf) and return it to the origin. That

RE: Thread named 'httpclient-main-1' not stopped when shutting down pool

2019-02-28 Thread Joan Balagueró
' correct? Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: sábado, 23 de febrero de 2019 17:36 Para: HttpClient User Discussion Asunto: Re: Thread named 'httpclient-main-1' not stopped when shutting down pool On Fri, 2019-02-22 at 13:14 +0100, Joan

Thread named 'httpclient-main-1' not stopped when shutting down pool

2019-02-22 Thread Joan Balagueró
Hello, When I shutdown my ‘CloseableHttpAsyncClient’instance (that has set a ‘PoolingAsyncClientConnectionManager’) a thread called ‘httpclient-main-1’ is not stopped and the following message is logged in tomcat log: 22-Feb-2019 13:00:59.326 ADVERTENCIA [localhost-startStop-1]

How to put working 2 separate log4j2 xml files within the same web app

2019-02-08 Thread Joan Balagueró - ventusproxy
Hello, This is a crosspost, already asked in StackOverflow, no success (https://stackoverflow.com/questions/54535220/how-to-put-working-2-separate- log4j2-xml-files) As a briefing, the question would be how we can have 2 log4j2 configurations working at the same time within the same web

2 HttpClient5 questions

2018-11-16 Thread Joan Balagueró
Hello, I hope the last questions: 1. The validateAfterInactivity with a value of zero means no validation? 2. Regarding the consume method, this is our implementation now: @Override public int consume(ByteBuffer src) throws IOException { while (src.hasRemaining())

RE: RV: Migration from Async 4.1.3 to HttpClient 5

2018-11-11 Thread Joan Balagueró
, 10 de noviembre de 2018 19:30 Para: HttpClient User Discussion Asunto: Re: RV: Migration from Async 4.1.3 to HttpClient 5 On Sat, 2018-11-10 at 18:02 +0100, Joan Balagueró - ventusproxy wrote: > Hello Oleg, > > Sorry, but I think I'm going to need a bit more help to finish >

RV: Migration from Async 4.1.3 to HttpClient 5

2018-11-10 Thread Joan Balagueró - ventusproxy
Thanks , Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: viernes, 9 de noviembre de 2018 15:31 Para: HttpClient User Discussion Asunto: Re: RV: Migration from Async 4.1.3 to HttpClient 5 On Fri, 2018-11-09 at 15:19 +0100, Joan Balagueró wrote: >

RE: RV: Migration from Async 4.1.3 to HttpClient 5

2018-11-09 Thread Joan Balagueró
. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: viernes, 9 de noviembre de 2018 15:01 Para: HttpClient User Discussion Asunto: Re: RV: Migration from Async 4.1.3 to HttpClient 5 On Fri, 2018-11-09 at 13:39 +0100, Joan Balagueró wrote: > Thanks Oleg. One m

RE: RV: Migration from Async 4.1.3 to HttpClient 5

2018-11-09 Thread Joan Balagueró
[mailto:ol...@apache.org] Enviado el: jueves, 8 de noviembre de 2018 11:04 Para: HttpClient User Discussion Asunto: Re: RV: Migration from Async 4.1.3 to HttpClient 5 On Wed, 2018-11-07 at 19:30 +0100, Joan Balagueró wrote: > Hello Oleg, > > We are finishing the migration and have the last

RV: Migration from Async 4.1.3 to HttpClient 5

2018-11-07 Thread Joan Balagueró
Hello Oleg, We are finishing the migration and have the last questions: 1. If a connection is kept-alive for 30s at second 0, and after 10s is reused, this connection will die at second 30 or will survive until second 40? 2. Regarding the RetryHandler, below the method inherited from http 4.5

RE: Migration from Async 4.1.3 to HttpClient 5

2018-10-23 Thread Joan Balagueró
Oleg > > -Mensaje original- > De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: domingo, > 21 de octubre de 2018 13:11 > Para: HttpClient User Discussion > Asunto: Re: Migration from Async 4.1.3 to HttpClient 5 > > On Sat, 2018-10-20 at 20:23 +0200, Joan Balague

RE: Migration from Async 4.1.3 to HttpClient 5

2018-10-22 Thread Joan Balagueró
That would be great. Thanks Oleg. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: domingo, 21 de octubre de 2018 13:11 Para: HttpClient User Discussion Asunto: Re: Migration from Async 4.1.3 to HttpClient 5 On Sat, 2018-10-20 at 20:23 +0200, Joan Balagueró

RE: Migration from Async 4.1.3 to HttpClient 5

2018-10-20 Thread Joan Balagueró
+0200, Joan Balagueró wrote: > Hello Oleg, > > I think it's a bit more complicated ... Let me explain it: > > - we have a pool with a response timeout of 15s > - this pool is shared by 2 webservices, ws1 and ws2. Ws1 uses the > pool's response timeout, but ws2 uses its own re

RE: Migration from Async 4.1.3 to HttpClient 5

2018-10-20 Thread Joan Balagueró
method). Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: sábado, 20 de octubre de 2018 18:17 Para: HttpClient User Discussion Asunto: Re: Migration from Async 4.1.3 to HttpClient 5 On Fri, 2018-10-19 at 21:07 +0200, Joan Balagueró wrote: > H

RE: Migration from Async 4.1.3 to HttpClient 5

2018-10-19 Thread Joan Balagueró
? Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: viernes, 19 de octubre de 2018 18:22 Para: HttpClient User Discussion Asunto: Re: Migration from Async 4.1.3 to HttpClient 5 On Fri, 2018-10-19 at 18:01 +0200, Joan Balagueró wrote: > Hi O

RE: Migration from Async 4.1.3 to HttpClient 5

2018-10-19 Thread Joan Balagueró
to HttpClient 5 On Fri, 2018-10-19 at 15:08 +0200, Joan Balagueró wrote: > Hello, > > > > We are in the process of migrating to HttpClient5 from > AsyncClient4.1.3, and we have some quiestions: > > > > 1. this.rc = > RequestConfig.custom

More about migration from async4.1.3 to http5

2018-10-19 Thread Joan Balagueró
Hello, Just three more questions: 1. Is this the way to set a byte array to the RequestBuilder’s entity (using a org.apache.http.nio.entity.NByteArrayEntity)? org.apache.hc.client5.http.classic.methods.RequestBuilder.RequestBuilder rb = RequestBuilder.post(uri);

Migration from Async 4.1.3 to HttpClient 5

2018-10-19 Thread Joan Balagueró
Hello, We are in the process of migrating to HttpClient5 from AsyncClient4.1.3, and we have some quiestions: 1. this.rc = RequestConfig.custom().setAuthenticationEnabled(false). setConnectionRequestTimeout(Timeout.ofMillis(this.poolTimeout)).

RV: Flush in RollingRandomAccessFile

2018-09-28 Thread Joan Balagueró - ventusproxy
. It wouldn’t be causing your problem though. Ralph > On Sep 28, 2018, at 9:17 AM, Joan Balagueró - ventusproxy > wrote: > > Hi Ralph, > > Below the trace when tomcat is stopped: > > 28-Sep-2018 18:14:36.251 INFORMACIÓN [main] > org.apache.catalina.core.StandardSer

RE: Flush in RollingRandomAccessFile

2018-09-28 Thread Joan Balagueró - ventusproxy
appens during shutdown. Ralph > On Sep 28, 2018, at 8:57 AM, Joan Balagueró - ventusproxy > wrote: > > Hello, > > The jars we have in our app are: log4j-1.2-api-2.11.1.jar, > log4j-api-2.11.1.jar, log4j-core-2.11.1.jar and log4j-web-2.11.1.jar. > > Are the right

RE: Flush in RollingRandomAccessFile

2018-09-28 Thread Joan Balagueró - ventusproxy
Hello, The jars we have in our app are: log4j-1.2-api-2.11.1.jar, log4j-api-2.11.1.jar, log4j-core-2.11.1.jar and log4j-web-2.11.1.jar. Are the right jars, or may I add something else? Thanks, Joan. -Mensaje original- De: Joan Balagueró - ventusproxy [mailto:joan.balagu

RE: Flush in RollingRandomAccessFile

2018-09-27 Thread Joan Balagueró - ventusproxy
nual/webapp.html <http://logging.apache.org/log4j/2.x/manual/webapp.html>. Ralph > On Sep 27, 2018, at 9:02 AM, Joan Balagueró - ventusproxy > wrote: > > Hi Ralph, > > After adding the log4j-web-2.11.1.jar to our app, it doesn't work yet. > > Do I need to add something to the we

RE: Flush in RollingRandomAccessFile

2018-09-27 Thread Joan Balagueró - ventusproxy
2018 17:33 Para: Log4J Users List Asunto: Re: Flush in RollingRandomAccessFile Are you using the log4j-web jar? It is supposed to handle this. Ralph > On Sep 27, 2018, at 8:14 AM, Joan Balagueró - ventusproxy > wrote: > > Hello, > > > > After sending thousands of

RE: Flush in RollingRandomAccessFile

2018-09-27 Thread Joan Balagueró - ventusproxy
? It is supposed to handle this. Ralph > On Sep 27, 2018, at 8:14 AM, Joan Balagueró - ventusproxy > wrote: > > Hello, > > > > After sending thousands of requests to our app, we stop the sender and > the log file appears like below: > > > > 1,54.38.179.175,2

Flush in RollingRandomAccessFile

2018-09-27 Thread Joan Balagueró - ventusproxy
Hello, After sending thousands of requests to our app, we stop the sender and the log file appears like below: 1,54.38.179.175,2018-09-27 16:55:51.618,A,13,A,39,A,72,A,120,N,,54.38.179.182:8080,g,8457,403,683,58,ok ,2018-09-27 16:55:51.677 1,54.38.179.17 Now we stop tomcat (when our

Right way to use EntityUtils.toString()

2018-09-15 Thread Joan Balagueró
Hello, This is the first time I need to use EntityUtils.toString(). My code is: try { ( . . . ) response = cluster.getHttpClient().performRequest(request); String body = EntityUtils.toString(response.getEntity(), GenericConstants.ENCODING_UTF8); ( . .

RE: Problem with daily rotation on log4j2 RollingFile

2018-09-05 Thread Joan Balagueró - ventusproxy
t. >> >> Ralph >> >>> On Aug 24, 2018, at 4:37 PM, Joan Balagueró - ventusproxy < >> joan.balagu...@ventusproxy.com> wrote: >>> >>> Hello, >>> No luck. I tried with DateLookup, but it doesn't work: >>> > filePattern=&q

RE: Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Joan Balagueró - ventusproxy
{}. TimeBasedTriggeringPolicy requires the %d to figure out what the rollover interval is. If you use ${pattern} it will be part of the file name but won’t impact the rollover interval. Ralph > On Aug 24, 2018, at 12:43 PM, Joan Balagueró - ventusproxy > wrote: > > Sorry, is th

RE: Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Joan Balagueró - ventusproxy
n it looks like. > > On Fri, 24 Aug 2018 at 11:30, Joan Balagueró - ventusproxy < > joan.balagu...@ventusproxy.com> wrote: > >> Hello, >> >> >> >> I’m using RollingFileAppender with full async logging. This is the config: >> >> >&

RE: Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Joan Balagueró - ventusproxy
with daily rotation on log4j2 RollingFile It is surprising to me that it would have been any different in Log4j. I believe it used similar logic for rolling over. I’d have to look at the code and check though. Ralph > On Aug 24, 2018, at 11:32 AM, Joan Balagueró - ventusproxy > wrote: &

RE: Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Joan Balagueró - ventusproxy
off using the CronTriggeringPolicy as it has a background thread that checks for the time to rollover. Ralph > On Aug 24, 2018, at 9:30 AM, Joan Balagueró - ventusproxy > wrote: > > Hello, > > > > I知 using RollingFileAppender with full async log

RE: Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Joan Balagueró - ventusproxy
leDateFormat there, not PatternLayout. Or > you could put the date in a $${} to delay expansion it looks like. > > On Fri, 24 Aug 2018 at 11:30, Joan Balagueró - ventusproxy < > joan.balagu...@ventusproxy.com> wrote: > >> Hello, >> >> >> >> I’m using

Problem with daily rotation on log4j2 RollingFile

2018-08-24 Thread Joan Balagueró - ventusproxy
Hello, I’m using RollingFileAppender with full async logging. This is the config: %m%d{-MM-dd HH:mm:ss.SSS}%n I started to send requests the 2018-08-22, the vproxy_access.2018-08-22 was correctly created and

Verifying we are using async loggers

2018-08-16 Thread Joan Balagueró - ventusproxy
Hello, We are using async loggers in our log4j2.xml, enabling -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContex tSelector when we start tomcat. When tomcat starts, we can see: 2018-08-07 21:03:56,535 localhost-startStop-1 TRACE Using default SystemClock for

http 5.0

2018-07-16 Thread Joan Balagueró
at 13:25 +0200, Joan Balagueró wrote: > Thanks Oleg, > I'm using the Async Client (4.1.2), what must I do to have it > available? Just move to HttpCore 5.0 / HttpClient 5.0? > You have two options: upgrading to HttpClient 5.0 or building a custom connection manager. Oleg >

RE: Global lock in http pool

2018-07-10 Thread Joan Balagueró
: Re: Global lock in http pool On Tue, 2018-07-10 at 12:01 +0200, Joan Balagueró wrote: > Hello, > > > > We are using the async http client 4.1.2 in our app (an api Gateway). > Several installations are managing more than 15.000 requests > simultaneous opened, and now

Global lock in http pool

2018-07-10 Thread Joan Balagueró
Hello, We are using the async http client 4.1.2 in our app (an api Gateway). Several installations are managing more than 15.000 requests simultaneous opened, and now we are in the process to optimize some code in the proxy. Some time ago we could read a thread talking about the global

RE: Log4j2 rolling file rotation by hour not working

2017-06-02 Thread Joan Balagueró - ventusproxy
st you try the CronTriggeringPolicy instead o the TimeBasedTriggeringPolicy. Ralph > On Jun 2, 2017, at 3:19 AM, Joan Balagueró - ventusproxy > <joan.balagu...@ventusproxy.com> wrote: > > Hello, > > > > I致e posted this in stackoverflow, with no success. So I知 trying here

Log4j2 rolling file rotation by hour not working

2017-06-02 Thread Joan Balagueró - ventusproxy
Hello, I’ve posted this in stackoverflow, with no success. So I’m trying here now. I'm seeing the following behaviour in log4j2, not sure if it's the expected. This is part of my log4j.xml: %m%d{-MM-dd HH:mm:ss.SSS}%n The log.rotateAccess is a

async http client DNS error

2017-05-25 Thread Joan Balagueró
Hello, We are having this error sporadically (once every week). Additional information: java.net.UnknownHostException: live.suppliers.gsisservices.com: System error at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at

RE: Async client with self signed certificate

2017-05-25 Thread Joan Balagueró
to do with cert that is the point i am trying to make... May be the file Store does not have the self signed certificate added to it... Hope it helps Thanks Hassan On Thu, May 18, 2017 at 2:48 PM, Joan Balagueró < joan.balagu...@grupoventus.com> wrote: > Hello, > > > >

Async client with self signed certificate

2017-05-18 Thread Joan Balagueró
Hello, I’ve been using SSL with client authentication with signed certificates in async http client 4.1, with no problem. My code is: FileInputStream fKeyStore = new FileInputStream(new File(keyStoreLocation)); KeyStore keyStore = KeyStore.getInstance(keyStoreType);

NoHttpResponseException in the async client

2016-11-11 Thread Joan Balagueró - ventusproxy
Hello, We have replaced the httpclient by the async client in our application. Everything works fine, but the ‘NoHttpResponseException’ has disappeared from our error statistics reports. So, or with the new async pool this error does not occur for some reason (that I don’t know) or we are not

NoHttpResponseException in the async client

2016-11-10 Thread Joan Balagueró
Hello, We have replaced the httpclient by the async client in our application. Everything works fine, but the ‘NoHttpResponseException’ has disappeared from our error statistics reports. So, or with the new async pool this error does not occur for some reason (that I don’t know) or we are not

RE: java.util.concurrent.TimeoutException with the async client

2016-10-31 Thread Joan Balagueró
Hi Oleg, > 1. Why, exactly in the same load conditions, a pool with 600 connections is > more than enough for the blocking client and not enough for the async one? > I cannot answer this question unless I can analyze and re-run the benchmark used to load test both clients. --> ok, I'll retest

RE: java.util.concurrent.TimeoutException with the async client

2016-10-27 Thread Joan Balagueró
client On Thu, 2016-10-27 at 12:23 +0200, Joan Balagueró wrote: > Hello, > > After working in production with the async client (instead of the > blocking > one) everything seems ok, except that now I can see this error > intermitently: > > java.util.con

RE: java.util.concurrent.TimeoutException with the async client

2016-10-27 Thread Joan Balagueró
Hello, Sorry, I didn't paste the last part of the xml: Thanks, Joan. -Mensaje original- De: Joan Balagueró [mailto:joan.balagu...@grupoventus.com] Enviado el: jueves, 27 de octubre de 2016 12:23 Para: httpclient-users@hc.apache.org Asunto: java.util.concurrent.TimeoutException

java.util.concurrent.TimeoutException with the async client

2016-10-27 Thread Joan Balagueró
Hello, After working in production with the async client (instead of the blocking one) everything seems ok, except that now I can see this error intermitently: java.util.concurrent.TimeoutException at org.apache.http.nio.pool.AbstractNIOConnPool.processPendingRequest(AbstractN

Throwing socketTimeoutException within HttpAsyncResponseConsumer consumeContent method

2016-10-20 Thread Joan Balagueró
Hello, In my async client pool, I’ve currently set up a select interval of 1000ms. But I need to control response timeouts of 50ms, 100ms, etc. So I’have tried to implement something like this in the 'consumeContent' method of my 'HttpAsyncResponseConsumer': public void consumeContent(final

RE: Socket timeout in the async http client

2016-10-07 Thread Joan Balagueró
causes reactor threads to consume more CPU resources. -- Dmitry On Fri, Oct 07, 2016 at 03:03:44PM +0200, Joan Balagueró wrote: > Hello, > > > > I’m setting the socket timeout on my requests as follows: > requestBuilder.setConfig(RequestConfig.copy(this.objHttp.g

Socket timeout in the async http client

2016-10-07 Thread Joan Balagueró
Hello, I’m setting the socket timeout on my requests as follows: requestBuilder.setConfig(RequestConfig.copy(this.objHttp.getRequestConfig()) .setSocketTimeout(responseTimeoutToSet).build()); I have double checked that the variable ‘responseTimeoutToSet’ has the right value. So if I set up

RE: I/O reactor status: STOPPED

2016-10-04 Thread Joan Balagueró
Within the HttpAsyncResponseConsumer? Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:o...@ok2consulting.com] Enviado el: martes, 4 de octubre de 2016 13:59 Para: HttpClient User Discussion; Joan Balagueró Asunto: Re: I/O reactor status: STOPPED On October 4, 2016 12:52:42 PM

I/O reactor status: STOPPED

2016-10-04 Thread Joan Balagueró
Hello, I'm occassionally receiving this error, and the async pool stops working: java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED at org.apache.http.util.Asserts.check(Asserts.java:46) at

RE: TimeoutException in async pool

2016-10-03 Thread Joan Balagueró
, 2016-10-03 at 10:45 +0200, Joan Balagueró wrote: > Thanks Stefan and yes, that's right. And I already told my client to modify > these settings. But I still have the doubt about why a Timeout exception in a > pool that has no upper limit in the number of pooled co

RE: TimeoutException in async pool

2016-10-03 Thread Joan Balagueró
> Den 3. okt. 2016 kl. 07.32 skrev Joan Balagueró > <joan.balagu...@grupoventus.com>: > > Hello, > > I’m using the async PoolingNHttpClientConnectionManager (v 4.1.2). > > Occasionally I’m getting this error: > > j

TimeoutException in async pool

2016-10-02 Thread Joan Balagueró
Hello, I’m using the async PoolingNHttpClientConnectionManager (v 4.1.2). Occasionally I’m getting this error: java.util.concurrent.TimeoutException at org.apache.http.nio.pool.AbstractNIOConnPool.processPendingRequest(AbstractN IOConnPool.java:364) at

Retries with the async client

2016-09-21 Thread Joan Balagueró
Hello, I’m trying to retry ‘NoHttpResponse’ exceptions with the async client. The point is I’m unable to generate this kind of error from my server. So my question is: does this kind of exceptions that can be retried reach the callback? In my case the HttpAsyncResponseConsumer.responseReceived

RE: Help with async client

2016-03-19 Thread Joan Balagueró
016-03-17 at 10:42 +0100, Joan Balagueró wrote: > Hi Oleg, > > Thanks. If I have a 400ms connection timeout and a 850ms response timeout, I > understand that the select interval must contain the 400ms (the lowest > value). True? > Yes. > In our app these connection/respon

RE: Help with async client

2016-03-19 Thread Joan Balagueró
east, because a > Thread.sleep(100) is set before writing any byte to the servletoutputstream. > > So, why are these exceptions not triggered? > > Thanks, > Joan. > > > > > -Mensaje original- > De: Oleg Kalnichevski [mailto:ol...@apache.org] >

RE: Help with async client

2016-03-19 Thread Joan Balagueró
these exceptions not triggered? Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: martes, 15 de marzo de 2016 16:14 Para: HttpClient User Discussion Asunto: Re: Help with async client On Tue, 2016-03-15 at 15:54 +0100, Joan Balagueró wro

Help with async client

2016-03-15 Thread Joan Balagueró
Hello, We have moved from the blocking client (PoolingHttpClientConnectionManager) to the async one (PoolingNHttpClientConnectionManager), and we are starting some tests to check performance. We have a test app that sends xml requests to our proxy. If the response is not found in cache,

Async client

2016-03-04 Thread Joan Balagueró
Hello, We are starting to work with the Async http client. We are creating a PoolingNHttpClientConnectionManager (translating our old PoolingHttpClientConnectionManager to a PoolingNHttpClientConnectionManager). Here we have 2 questions: 1. Hasn't the async client a retry handler and a stale

RE: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-24 Thread Joan Balagueró
Hello, Regarding this posts: Any help in this issue would be much appreciated. Thanks mrhuang I am not quite sure I understand the issue. You should not even be using #releaseConnection in the first place. It is provided for compatibility with HC 3.x. You should always close

SSL and stale check changes

2015-04-01 Thread Joan Balagueró
Hello, I’ve just installed HC4.4.1 and some methods related to ssl are deprecated. Concretely this piece of code: SSLContext sslContext = SSLContexts.custom().useTLS().build(); sslContext.init(keyManagers, null, null); return (new SSLConnectionSocketFactory(sslContext,

Keep alive

2014-03-13 Thread Joan Balagueró
Hello, After migrating to 4.3 from 4.1, I don’t get keep-alive connections working. My code is: (…) if (this.vkas == null) this.vkas = new KeepAliveStrategy(keepAliveDuration); else this.vkas.setKeepAliveDuration(keepAliveDuration); (...) HttpClientBuilder hcBuilder =

RE: Keep alive

2014-03-13 Thread Joan Balagueró
Hello, Forget it ... Thanks. Joan. -Mensaje original- De: Joan Balagueró [mailto:joan.balagu...@grupoventus.com] Enviado el: jueves, 13 de marzo de 2014 19:23 Para: httpclient-users@hc.apache.org Asunto: Keep alive Hello, After migrating to 4.3 from 4.1, I don’t get keep-alive

Final questions about HC4.3.3

2014-03-13 Thread Joan Balagueró
Hello, Migration from 4.1 to 4.3 is finished. Just some questions about certain parameters: 1. For performance, is it recommended to set true to ‘setTcpNoDelay’ and false to ‘setStaleConnectionCheckEnabled’? I tried several combinations in my stress tests and I don’t see any

RE: Migrating from 4.1 to 4.3

2014-03-12 Thread Joan Balagueró
. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: miércoles, 12 de marzo de 2014 15:35 Para: HttpClient User Discussion Asunto: Re: Migrating from 4.1 to 4.3 On Tue, 2014-03-11 at 12:43 +0100, Joan Balagueró wrote: Hello, 1. Where can I set

RE: Migrating from 4.1 to 4.3

2014-03-12 Thread Joan Balagueró
] Enviado el: miércoles, 12 de marzo de 2014 17:27 Para: HttpClient User Discussion Asunto: Re: Migrating from 4.1 to 4.3 On Wed, 2014-03-12 at 15:46 +0100, Joan Balagueró wrote: Hello Oleg, Thanks. But taking this example: RequestConfig.Builder builder = RequestConfig.custom(); if (proxyPort

RE: SSL connection

2013-12-02 Thread Joan Balagueró
diciembre de 2013 10:36 Para: HttpClient User Discussion Asunto: Re: SSL connection On Sat, 2013-11-30 at 23:52 +0100, Joan Balagueró wrote: Hello Oleg, Thanks for you help. Everything works fine now. Just one more question: when I shutdown Tomcat, I see this message in catalina.out (ssl debug

RE: SSL connection

2013-12-02 Thread Joan Balagueró
, 2013-12-02 at 11:16 +0100, Joan Balagueró wrote: Oleg, I close the connection pool by using this.objHttp.getConnectionManager().shutdown(); About the expired connections, I have an idleConnectionsHandler that every 5 seconds removes expired connections and those that take idle longer than 5

RE: SSL connection

2013-12-02 Thread Joan Balagueró
/jsse/ReadDebug.html [2] http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#Debug Best regards. On 2 December 2013 17:40, Joan Balagueró joan.balagu...@grupoventus.com wrote: Oleg, What I would mean was: 1. I send 8 https requests, then I have 8 connections

SSL question

2013-11-30 Thread Joan Balagueró Ventus Proxy
Hello, I have an application that sends https requests with client authentication from a servlet running on tomcat. It’s working fine. When I shutdown Tomcat, I see this message in catalina.out (ssl debug enabled): main, called close() main, called closeInternal(true) main, SEND

RE: SSL connection

2013-11-28 Thread Joan Balagueró
Discussion Asunto: Re: SSL connection On Wed, 2013-11-27 at 19:24 +0100, Joan Balagueró wrote: Hello, I have an application (servlet running on tomcat) that must send a https request to a server that requires client authentication. Tomcat has correctly installed the truststore

SSL connection

2013-11-27 Thread Joan Balagueró
Hello, I have an application (servlet running on tomcat) that must send a https request to a server that requires client authentication. Tomcat has correctly installed the truststore and keystore. But I understand that when our app sends the https request, I have to attach the client

Tomcat and IP transparency

2013-07-31 Thread Joan Balagueró Ventus Proxy
Hello, I already asked this question to the Apache HttpClient Forum. They don't know if this is possible with java/Tomcat. I have developed a proxy servlet with an xml cache, running in a Tomcat 6.0.37 on Linux Centos6.4. When the incoming xml request (sent from an external client) is

IP transparency

2013-07-30 Thread Joan Balagueró
Hello, I have developed a proxy servlet with an xml cache, running in a Tomcat 6. When the incoming xml request is not found in the proxy cache, I use HttpClient 4.2.5 to create a new http request (PoolingConnection) and redirect it to the client application servers to get the xml

Repeated cookies with same name and value

2013-04-14 Thread Joan Balagueró
Hello, I’m querying an url (with head method) and printing all the response headers received: HttpResponse response = objHttp.execute(objHead); HeaderIterator it = response.headerIterator(); while (it.hasNext()) { Header h = it.nextHeader(); System.out.println(h.getName()

EntityUtils.consume question

2013-04-08 Thread Joan Balagueró
Hello, Is there any overhead in executing a ‘EntityUtils.consume(httpEntity)’ if the response has been completely consumed before? (reading and closing the ‘entity.getContent()’ inputStream) Thanks, Joan.

Re: HttpClient 4.0

2009-09-28 Thread Joan Balagueró Valls
--Mensaje original-- De: visualize Para:httpclient-users@hc.apache.org Responder a:HttpClient User Discussion Asunto: Re: HttpClient 4.0 Enviado: 28 Sep, 2009 11:06 olegk wrote: visualize wrote: Hello, I'm trying to port my application to use HttpClient 4.0 instead of version

RE: RV: NO_HTTP_RESPONSE_EXCEPTION

2009-07-22 Thread Joan Balagueró Valls
Hello Oleg, I attach the http log. I've been taking a look to this trace, and I've observed the following. I don't know if it's important or not. In line 53315, we have a request that is correctly processed. When HttpClient tries to get a connection from pool, the information is: Total

RE: RV: NO_HTTP_RESPONSE_EXCEPTION

2009-07-22 Thread Joan Balagueró Valls
Hello Oleg, Ok, then, in your opinion, it seems that some connections were closed on the server side, but for H4 they are OK, and when H4 tries to use them, then a NoHttpResponseException is thrown. In fact, I've implemented an IdleConnectionsHandler that closes expired connections and idle

RE: Http trace for cookies

2009-07-09 Thread Joan Balagueró Valls
)); -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: miércoles, 08 de julio de 2009 23:54 Para: HttpClient User Discussion Asunto: Re: Http trace for cookies Joan Balagueró Valls wrote: Hello Oleg, I’m trying to send you the trace, but your mail

EXPECT-CONTINUE HANDSHAKE

2009-07-09 Thread Joan Balagueró Valls
Hello Oleg, Can I set the expect-continue handshake at httpclient level? HttpParams objHttpParams = new BasicHttpParams(); HttpProtocolParams.setVersion(objHttpParams, HttpVersion.HTTP_1_1); ClientConnectionManager cm = new ThreadSafeClientConnManager(this.objHttpParams,

QUESTION ABOUT COOKIES

2009-07-08 Thread Joan Balagueró Valls
Again the attach zipped. Joan. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org

TRYING AGAIN THE ATTACH FOR COOKIES QUESTION

2009-07-08 Thread Joan Balagueró Valls
Hello, Here the attach (I hope) Joan. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Http trace for cookies

2009-07-08 Thread Joan Balagueró Valls
Hello Oleg, I’m trying to send you the trace, but your mail server does not accept it. I paste here a couple of lines of this trace: This is the interesting part of the trace. The expiry date is correct in the line 7 (60 seconds from now). But it seems this expiry date does not appear

RE: QUESTION ABOUT COOKIES

2009-07-07 Thread Joan Balagueró Valls
Hello Oleg, Thanks, after some tests this is exactly what it happens. When I send this cookie to my servlet, I receive all its data correctly except the max-age attribute, which is always -1. I'm trying to set MAX_AGE with your API, and I'm getting crazy... I've tried

RE: QUESTION ABOUT COOKIES

2009-07-07 Thread Joan Balagueró Valls
Hello, Here the attach with the trace. It's a post request from my local app to my servlet. In all tests I've always used: bcc.setVersion(1); bcc.setAttribute(ClientCookie.VERSION_ATTR, 1); Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el:

H4 - B3

2009-06-03 Thread Joan Balagueró Valls
Hello Oleg, Do you know any idea about when you plan to release H4-beta3? Many thanks, Joan.

RE: NO_HTTP_RESPONSE_EXCEPTION

2009-02-16 Thread Joan Balagueró
...@apache.org wrote: Joan Balagueró wrote: Thanks Oleg. It seems strange to me because HttpClient3 (sending requests to the same server) never fails. I'll take a look at the code again and I'll comment you something else. I do not know why the server chokes on packets generated by HttpClient 4

RE: NO_HTTP_RESPONSE_EXCEPTION

2009-02-06 Thread Joan Balagueró
Discussion Asunto: RE: NO_HTTP_RESPONSE_EXCEPTION On Fri, 2009-02-06 at 13:44 +0100, Joan Balagueró wrote: Hello Oleg, This is the log. I sent 10 concurrent requests, and all of them failed with HttpNoResponseException. Thanks for you help, Joan. There is nothing wrong

  1   2   >