akhq icon indicating copy to clipboard operation
akhq copied to clipboard

/topic/data endpoint is not honouring akhq.topic-data.size

Open nightswimmings opened this issue 3 years ago • 11 comments

It keeps returning the default count number 50, even if akhq's application.yml contains the key

akhq:
   topic-data:
        size: 2000

nightswimmings avatar Feb 22 '22 17:02 nightswimmings

Looking at code, we never used this option, so normal it don't work. I think a quick fix was possible but need more time to handle this. PR are welcome :+1:

tchiotludo avatar Feb 22 '22 17:02 tchiotludo

Thanks for the fast answer @tchiotludo. Then topic/data is paginated at 50 by design with no way to tune it currently, right?

Anyway, I just found out the /data/search variant honours it, thankfully

nightswimmings avatar Feb 22 '22 17:02 nightswimmings

Exactly. Or you can change this :

akhq: 
  clients-defaults:
    consumer:
      properties:
        max.poll.records: 50

that will do the job I think

tchiotludo avatar Feb 22 '22 17:02 tchiotludo

I checked the code in RecordRepository but it seems the var is not used anywhere if github finders work ok:

@Value("${akhq.clients-defaults.consumer.properties.max.poll.records:50}")
protected int maxPollRecords;

nightswimmings avatar Feb 22 '22 17:02 nightswimmings

This vars maxPollRecords is not used, but the max.poll.records is injected on every consumer, so that one works

tchiotludo avatar Feb 22 '22 17:02 tchiotludo

@tchiotludo are you working on this already? I'd love to contribute back to akhq (which I used a lot in past years) and a bug fix may be a good way to learn about the code base

lucapette avatar Feb 24 '22 17:02 lucapette

@lucapette: I don't work on this but I'm not sure we need to work on this, since we max.poll.records, maybe removing the options and the documentation will be fine

tchiotludo avatar Feb 24 '22 17:02 tchiotludo

@tchiotludo if that's your preference, I understand. I can do the docs if you want (I value docs contributions as much as code. Still works as a way to get acquainted with the codebase as well) and probably close the issue with that pr (your call of course!)

lucapette avatar Feb 24 '22 18:02 lucapette

yes documentation have a lot of values :+1: If you want to search something to do I do some triage here

tchiotludo avatar Feb 24 '22 19:02 tchiotludo

@tchiotludo thank you! I'll have a look as soon as I can. If you're ok with it (reaction to the comment will do) I'll open a pr to clean up the docs from the unused option

lucapette avatar Mar 03 '22 15:03 lucapette

@lucapette thanks ;)

tchiotludo avatar Mar 03 '22 15:03 tchiotludo