From bded08781888a7744d1f5d0c56ceb37ecd46c10c Mon Sep 17 00:00:00 2001 From: Keith Hatton Date: Wed, 16 May 2018 13:13:34 +0100 Subject: [PATCH 1/4] :arrow_up: Migrate to CircleCI 2.0 --- .circle/config.yml | 10 ++++++++++ .gitignore | 1 + 2 files changed, 11 insertions(+) create mode 100644 .circle/config.yml diff --git a/.circle/config.yml b/.circle/config.yml new file mode 100644 index 0000000..124eec8 --- /dev/null +++ b/.circle/config.yml @@ -0,0 +1,10 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/openjdk:8-jdk-browsers + steps: + - checkout + - run: + name: Maven + command: mvn clean verify diff --git a/.gitignore b/.gitignore index db6d06d..659de5f 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ atlassian-ide-plugin.xml # NetBeans specific files/directories .nbattrs +/bin/ From 547fefac46b1aa38380ed6d4a43e79940844b784 Mon Sep 17 00:00:00 2001 From: Keith Hatton Date: Fri, 18 May 2018 14:18:27 +0100 Subject: [PATCH 2/4] :memo: Markdown fixes in README, also try to trigger a Circle build. --- README.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 795052c..2ffc8a4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ -#message-queue-consumer +# message-queue-consumer Library which does polling to consume messages from a message queue via an http proxy. Supports group and topic semantics. -Configuration +## Configuration + ``` topicName - name of the topic from which to consume messages groupName - consumer group queueProxyHost - location of the http proxy(eg "http://localhost:8082") queue - used for dynamic routing. This values will be passed on as an http Host header on all the requests backoffPeriod - period in milliseconds for which the app will sleep before trying to consume messages - - backoff is applied when queue is empty(last consume request returned no messages) or exception occurred when trying to connect to the proxy + - backoff is applied when queue is empty(last consume request returned no messages) or exception occurred when trying to connect to the proxy autoCommit - boolean flag which configures autoCommit when consuming messages. If true offsets are committed if the consume request to the proxy returns 200. - if false offsets are manually committed after the batch of messages are processed - because of the proxy limitations the recommendations are to use autocommit true for topics with small messages @@ -20,14 +21,11 @@ offsetReset - possible values are "smallest" and "largest" - using smallest will impact the memory usage of the proxy streamCount - number of threads to use for processing messages - each thread will create a new proxy consumer instance which will be assigned to different kafka partition(s) - -The library expects a jersey http client to be passed in. Make sure the client you provide supports overriding http Host header. ``` +The library expects a jersey http client to be passed in. Make sure the client you provide supports overriding http Host header. -How to use -``` -#Add library as a dependency -#Configure consumer with the params explained above -#Add implementation for: com.ft.message.consumer.MessageListener -``` +## How to use +1. Add library as a dependency +1. Configure consumer with the params explained above +1. Add implementation for: `com.ft.message.consumer.MessageListener` From e23dae80eda6f1104436f5ffe7e388c8d6bab342 Mon Sep 17 00:00:00 2001 From: Keith Hatton Date: Fri, 18 May 2018 14:19:42 +0100 Subject: [PATCH 3/4] :truck: Fix location of CircleCI config file. --- {.circle => .circleci}/config.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.circle => .circleci}/config.yml (100%) diff --git a/.circle/config.yml b/.circleci/config.yml similarity index 100% rename from .circle/config.yml rename to .circleci/config.yml From e876961a2ef2cc45722676ca5c3e49f79035ab81 Mon Sep 17 00:00:00 2001 From: Keith Hatton Date: Fri, 18 May 2018 14:25:01 +0100 Subject: [PATCH 4/4] :green_heart: Use dropwizard-internal as a base image. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 124eec8..c822b46 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/openjdk:8-jdk-browsers + - image: coco/dropwizardbase-internal:v1.0.3 steps: - checkout - run: