# Unable to implement an interface provided in Java REST client 5.3.0

**URL:** <https://discuss.elastic.co/t/unable-to-implement-an-interface-provided-in-java-rest-client-5-3-0/81545>\
**Category:** Elasticsearch\
**Created:** [April 6, 2017, 11:00pm UTC](https://discuss.elastic.co/t/unable-to-implement-an-interface-provided-in-java-rest-client-5-3-0/81545 "2017-04-06T23:00:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkhan](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mkhan](https://discuss.elastic.co/u/mkhan)\
**Post date:** [April 6, 2017, 11:00pm UTC](https://discuss.elastic.co/t/unable-to-implement-an-interface-provided-in-java-rest-client-5-3-0/81545/1 "2017-04-06T23:00:06Z")

</div>

The HttpAsyncReponseConsumerFactory 's access modifier as it sits in version 5.3.0 of Java REST Client libraries is package protected, i.e, no access modifier has been specified therefore users will not be able to implement it.

However, the javadoc for the org.elasticsearch.client.HttpAsyncResponseConsumerFactory says :

/\*\*

- Factory used to create instances of {@link HttpAsyncResponseConsumer}. Each request retry needs its own instance of the
- consumer object. **Users can implement this interface** and pass their own instance to the specialized
- performRequest methods that accept an {@link HttpAsyncResponseConsumerFactory} instance as argument.  
\*/

I believe implementing the aforementioned interface is the only way to specify a buffer limit of higher than 100 MB?

Can someone please advise? Much appreciated.

---

<div class="post-metadata">

**Author:** ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)\
**Post date:** [April 14, 2017, 7:38am UTC](https://discuss.elastic.co/t/unable-to-implement-an-interface-provided-in-java-rest-client-5-3-0/81545/2 "2017-04-14T07:38:58Z")

</div>

This was indeed a bug, fixed with [https://github.com/elastic/elasticsearch/pull/23970](https://github.com/elastic/elasticsearch/pull/23970).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 12, 2017, 7:51am UTC](https://discuss.elastic.co/t/unable-to-implement-an-interface-provided-in-java-rest-client-5-3-0/81545/3 "2017-05-12T07:51:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
