diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..c822b46 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,10 @@ +version: 2 +jobs: + build: + docker: + - image: coco/dropwizardbase-internal:v1.0.3 + 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/ 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`