├── .gitignore ├── .idea └── libraries │ ├── Maven__org_slf4j_slf4j_api_1_7_25.xml │ └── Maven__org_xerial_snappy_snappy_java_1_1_7_2.xml ├── LICENSE ├── README.md ├── checkstyle └── suppressions.xml ├── docs ├── .buildinfo ├── changelog.html ├── genindex.html ├── includes │ └── prerequisites.html ├── index.html ├── objects.inv ├── search.html ├── searchindex.js ├── sink_config_options.html ├── sink_connector.html ├── sources │ ├── changelog.rst.txt │ ├── includes │ │ └── prerequisites.rst.txt │ ├── index.rst.txt │ ├── sink_config_options.rst.txt │ └── sink_connector.rst.txt └── static │ ├── ajax-loader.gif │ ├── basic.css │ ├── comment-bright.png │ ├── comment-close.png │ ├── comment.png │ ├── css │ ├── badge_only.css │ └── theme.css │ ├── doctools.js │ ├── documentation_options.js │ ├── down-pressed.png │ ├── down.png │ ├── file.png │ ├── fonts │ ├── Lato │ │ ├── lato-bold.eot │ │ ├── lato-bold.ttf │ │ ├── lato-bold.woff │ │ ├── lato-bold.woff2 │ │ ├── lato-bolditalic.eot │ │ ├── lato-bolditalic.ttf │ │ ├── lato-bolditalic.woff │ │ ├── lato-bolditalic.woff2 │ │ ├── lato-italic.eot │ │ ├── lato-italic.ttf │ │ ├── lato-italic.woff │ │ ├── lato-italic.woff2 │ │ ├── lato-regular.eot │ │ ├── lato-regular.ttf │ │ ├── lato-regular.woff │ │ └── lato-regular.woff2 │ ├── RobotoSlab │ │ ├── roboto-slab-v7-bold.eot │ │ ├── roboto-slab-v7-bold.ttf │ │ ├── roboto-slab-v7-bold.woff │ │ ├── roboto-slab-v7-bold.woff2 │ │ ├── roboto-slab-v7-regular.eot │ │ ├── roboto-slab-v7-regular.ttf │ │ ├── roboto-slab-v7-regular.woff │ │ └── roboto-slab-v7-regular.woff2 │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 │ ├── jquery-3.2.1.js │ ├── jquery.js │ ├── js │ ├── modernizr.min.js │ └── theme.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.3.1.js │ ├── underscore.js │ ├── up-pressed.png │ ├── up.png │ └── websupport.js ├── docs_build ├── Makefile ├── README.md ├── _config.yml ├── autoreload.py ├── changelog.rst ├── conf.py ├── includes │ └── prerequisites.rst ├── index.rst ├── make.bat ├── make_docs.sh ├── requirements.txt ├── sink_config_options.rst └── sink_connector.rst ├── licenses.html ├── licenses └── LICENSE-kafka-connect-http-1.0.0-SNAPSHOT.txt ├── logos ├── http.jpg └── thomaskwscott.png ├── pom.xml ├── src ├── assembly │ ├── development.xml │ ├── package.xml │ └── standalone.xml ├── main │ ├── java │ │ └── uk │ │ │ └── co │ │ │ └── threefi │ │ │ └── connect │ │ │ └── http │ │ │ ├── HttpSinkConnector.java │ │ │ ├── sink │ │ │ ├── HttpApiWriter.java │ │ │ ├── HttpSinkConfig.java │ │ │ └── HttpSinkTask.java │ │ │ └── util │ │ │ └── Version.java │ └── resources │ │ └── kafka-connect-http-version.properties └── test │ ├── java │ └── uk │ │ └── co │ │ └── threefi │ │ └── connect │ │ └── http │ │ ├── HttpSinkConnectorTest.java │ │ └── sink │ │ ├── HttpApiWriterTest.java │ │ ├── HttpSinkTaskTest.java │ │ ├── RequestInfo.java │ │ └── RestHelper.java │ └── resources │ └── log4j.properties └── version.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .idea* 2 | target/* 3 | *.iml 4 | .classpath 5 | .project 6 | .settings/ 7 | .vscode/ 8 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_xerial_snappy_snappy_java_1_1_7_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kafka Connect HTTP Connector 2 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fthomaskwscott%2Fkafka-connect-http.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fthomaskwscott%2Fkafka-connect-http?ref=badge_shield) 3 | 4 | kafka-connect-http is a [Kafka Connector](http://kafka.apache.org/documentation.html#connect) 5 | for invoking HTTP APIs with data from Kafka. 6 | 7 | See the [documentation](https://thomaskwscott.github.io/kafka-connect-http/) for how to use this connector. 8 | 9 | # Development 10 | 11 | You can build kafka-connect-http with Maven using the standard lifecycle phases. To build the connector run `mvn package`, which will create a jar file in the `target` directory that you can use with Kafka Connect. 12 | 13 | # FAQ 14 | 15 | Refer frequently asked questions on Kafka Connect HTTP here - 16 | https://github.com/thomaskwscott/kafka-connect-http/wiki/FAQ 17 | 18 | # Contribute 19 | 20 | - Source Code: https://github.com/thomaskwscott/kafka-connect-http 21 | - Issue Tracker: https://github.com/thomaskwscott/kafka-connect-http/issues 22 | 23 | # License 24 | 25 | The project is licensed under the Apache 2 license. 26 | -------------------------------------------------------------------------------- /checkstyle/suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: ef53eefa99f4f61b871c548be6eb5b7a 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/changelog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Changelog — Kafka Connect HTTP 5.2.1 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 100 | 101 |
102 | 103 | 104 | 110 | 111 | 112 |
113 | 114 |
115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 |
133 | 134 |
    135 | 136 |
  • Docs »
  • 137 | 138 |
  • Changelog
  • 139 | 140 | 141 |
  • 142 | 143 | 144 | View page source 145 | 146 | 147 |
  • 148 | 149 |
150 | 151 | 152 |
153 |
154 |
155 |
156 | 157 |
158 |

Changelog

159 |
160 |

Version 5.2.1

161 |
    162 |
  • Removed batch.linger.ms property to prevent potential scenario where messages can have offsets committed without being sent during task failure.
  • 163 |
164 |
165 |
166 |

Version 5.2.0

167 |
    168 |
  • Changed versioning to match tested Confluent Platform version
  • 169 |
  • Added batching options
  • 170 |
171 |
172 |
173 |

Version 1.0.0

174 |
175 |
176 | 177 | 178 |
179 | 180 |
181 | 202 | 203 |
204 |
205 | 206 |
207 | 208 |
209 | 210 | 211 | 212 | 213 | 214 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 238 | 239 | 240 | -------------------------------------------------------------------------------- /docs/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Index — Kafka Connect HTTP 5.2.1 documentation 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 95 | 96 |
97 | 98 | 99 | 105 | 106 | 107 |
108 | 109 |
110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
128 | 129 |
    130 | 131 |
  • Docs »
  • 132 | 133 |
  • Index
  • 134 | 135 | 136 |
  • 137 | 138 | 139 | 140 |
  • 141 | 142 |
143 | 144 | 145 |
146 |
147 |
148 |
149 | 150 | 151 |

Index

152 | 153 |
154 | 155 |
156 | 157 | 158 |
159 | 160 |
161 | 175 | 176 |
177 |
178 | 179 |
180 | 181 |
182 | 183 | 184 | 185 | 186 | 187 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/includes/prerequisites.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <no title> — Kafka Connect HTTP 5.2.1 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 94 | 95 |
96 | 97 | 98 | 104 | 105 | 106 |
107 | 108 |
109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 |
127 | 128 |
    129 | 130 |
  • Docs »
  • 131 | 132 |
  • <no title>
  • 133 | 134 | 135 |
  • 136 | 137 | 138 | View page source 139 | 140 | 141 |
  • 142 | 143 |
144 | 145 | 146 |
147 |
148 |
149 |
150 | 151 |

Prerequisites:

152 |
    153 |
  • Confluent Platform is installed and services are running. This quick start assumes that you are
  • 154 |
155 |

using cp-demo <https://github.com/confluentinc/cp-demo>, but standalone installations are also supported.

156 | 157 | 158 |
159 | 160 |
161 | 175 | 176 |
177 |
178 | 179 |
180 | 181 |
182 | 183 | 184 | 185 | 186 | 187 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Kafka Connect HTTP Connector — Kafka Connect HTTP 5.2.1 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 95 | 96 |
97 | 98 | 99 | 105 | 106 | 107 |
108 | 109 |
110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
128 | 129 |
    130 | 131 |
  • Docs »
  • 132 | 133 |
  • Kafka Connect HTTP Connector
  • 134 | 135 | 136 |
  • 137 | 138 | 139 | View page source 140 | 141 | 142 |
  • 143 | 144 |
145 | 146 | 147 |
148 |
149 |
150 |
151 | 152 |
153 |

Kafka Connect HTTP Connector

154 |

Contents:

155 | 185 |
186 | 187 | 188 |
189 | 190 |
191 | 212 | 213 |
214 |
215 | 216 |
217 | 218 |
219 | 220 | 221 | 222 | 223 | 224 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 248 | 249 | 250 | -------------------------------------------------------------------------------- /docs/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/objects.inv -------------------------------------------------------------------------------- /docs/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Search — Kafka Connect HTTP 5.2.1 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 | 42 | 43 | 94 | 95 |
96 | 97 | 98 | 104 | 105 | 106 |
107 | 108 |
109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 |
127 | 128 |
    129 | 130 |
  • Docs »
  • 131 | 132 |
  • Search
  • 133 | 134 | 135 |
  • 136 | 137 | 138 | 139 |
  • 140 | 141 |
142 | 143 | 144 |
145 |
146 |
147 |
148 | 149 | 157 | 158 | 159 |
160 | 161 |
162 | 163 |
164 | 165 |
166 | 180 | 181 |
182 |
183 | 184 |
185 | 186 |
187 | 188 | 189 | 190 | 191 | 192 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 217 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | -------------------------------------------------------------------------------- /docs/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({docnames:["changelog","includes/prerequisites","index","sink_config_options","sink_connector"],envversion:52,filenames:["changelog.rst","includes/prerequisites.rst","index.rst","sink_config_options.rst","sink_connector.rst"],objects:{},objnames:{},objtypes:{},terms:{"class":4,"default":3,"export":4,"function":4,"import":3,"int":3,"null":[3,4],Added:0,For:4,The:[3,4],abov:4,accept:4,accumul:3,added:3,all:4,allow:4,also:[1,4],apach:4,api:[3,4],appli:[3,4],applic:4,around:4,assum:[1,4],attempt:3,attribut:3,backoff:3,bar1:4,bar2:4,bar3:4,bar4:4,bar5:4,base:[3,4],bash:4,basic:4,batch:[0,2],befor:[3,4],begin:[3,4],being:[0,4],below:4,between:4,bootstrap:4,broker:4,build:3,built:4,call:4,can:[0,3,4],chang:0,changelog:2,charact:3,cluster:4,com:[1,4],commit:0,compos:4,config:4,configur:[2,4],confirm:2,confluent:[0,1,4],confluentinc:[1,4],connect:4,consol:4,consum:4,contain:4,content:[2,4],control:4,convert:4,creat:2,curl:4,custom:4,data:4,delet:3,demo:[1,4],destin:4,destinationapi:4,docker:4,dure:0,earlier:4,effici:4,end:3,error:3,exampl:4,exec:4,expect:4,factor:4,fail:3,failur:0,featur:2,fetch:4,follow:[3,4],foo1:4,foo2:4,foo3:4,foo4:4,foo5:4,from:4,fulli:4,github:[1,4],given:3,have:[0,4],header:[3,4],here:3,high:3,http:1,httpsinkconnector:4,includ:3,individu:4,inform:4,inject:4,input:4,insid:4,instal:[1,4],instanc:4,interactr:3,invok:3,json:4,jsontest:4,kafka1:4,kafka:4,kei:[2,3],linger:0,list:[3,4],load:2,localhost:4,low:3,made:3,man:2,match:[0,3],max:[3,4],maximum:[3,4],mean:4,medium:3,mention:4,messag:[0,3,4],metadata:4,method:[3,4],millisecond:3,monitor:4,more:4,name:4,need:4,note:4,now:4,number:[3,4],offset:0,onc:3,open:4,option:[0,2,4],org:4,origin:4,our:4,output:4,outsid:4,own:4,paramet:4,partit:4,pattern:[3,4],payload:3,platform:[0,1,4],poll:4,poor:2,post:[3,4],potenti:0,prefix:[3,4],prerequisit:[1,4],prevent:0,produc:4,properti:[0,3,4],proxi:4,put:3,quick:[1,2],record:[3,4],regex:2,remov:0,replac:[2,3],replic:2,replica:4,request:[3,4],resembl:4,rest:4,restproxi:4,result:2,retri:2,run:[1,4],scenario:0,see:4,sent:0,separ:[3,4],seper:3,server:4,servic:[1,4],should:4,signl:4,singl:4,sink:2,size:[3,4],solut:4,some:4,somekei:3,sourc:2,special:4,standalon:[1,4],start:[1,2],still:4,storag:4,string:[3,4],stringconvert:4,structur:4,submit:4,subscript:4,substitut:2,suffix:[3,4],support:[1,4],take:4,task:[0,3,4],test:0,than:4,them:4,thi:[1,3,4],threefi:4,time:3,topic:[2,3],type:[3,4],url:[3,4],use:3,used:[3,4],using:[1,4],valid:3,valu:[3,4],version:2,vnd:4,wai:4,wait:3,when:4,where:0,which:4,without:0,wrap:4,write:4,you:[1,4],your:4,zookeep:4},titles:["Changelog","<no title>","Kafka Connect HTTP Connector","HTTP Sink Configuration Options","HTTP Sink Connector"],titleterms:{batch:[3,4],changelog:0,configur:3,confirm:4,connect:[2,3],connector:[2,4],creat:4,featur:4,http:[2,3,4],kafka:2,kei:4,load:4,man:4,option:3,poor:4,quick:4,regex:[3,4],replac:4,replic:4,result:4,retri:3,sink:[3,4],sourc:4,start:4,substitut:4,topic:4,version:0}}) -------------------------------------------------------------------------------- /docs/sink_config_options.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | HTTP Sink Configuration Options — Kafka Connect HTTP 5.2.1 documentation 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 | 45 | 102 | 103 |
104 | 105 | 106 | 112 | 113 | 114 |
115 | 116 |
117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 |
135 | 136 |
    137 | 138 |
  • Docs »
  • 139 | 140 |
  • HTTP Sink Configuration Options
  • 141 | 142 | 143 |
  • 144 | 145 | 146 | View page source 147 | 148 | 149 |
  • 150 | 151 |
152 | 153 | 154 |
155 |
156 |
157 |
158 | 159 |
160 |

HTTP Sink Configuration Options

161 |
162 |

Connection

163 |
164 |
http.api.url
165 |

HTTP API base url.

166 |
    167 |
  • Type: string
  • 168 |
  • Importance: high
  • 169 |
170 |
171 |
request.method
172 |

Request method used to interactr with the HTTP API (PUT/POST/DELETE).

173 |
    174 |
  • Type: string
  • 175 |
  • Default: POST
  • 176 |
  • Importance: high
  • 177 |
178 |
179 |
headers
180 |

HTTP Request Headers.

181 |
    182 |
  • Type: string
  • 183 |
  • Default: null
  • 184 |
  • Importance: low
  • 185 |
186 |
187 |
header.separator
188 |

Seperator used in the headers property.

189 |
    190 |
  • Type: string
  • 191 |
  • Default: |
  • 192 |
  • Importance: low
  • 193 |
194 |
195 |
196 |
197 |
198 |

Regex

199 |
200 |
regex.patterns
201 |

Character separated list of regex patterns to match in the payload.

202 |
    203 |
  • Type: string
  • 204 |
  • Importance: low
  • 205 |
206 |
207 |
regex.replacements
208 |

Character separated list of string to use as replacements for the matches to the patterns in regex.patterns.

209 |
    210 |
  • Type: string
  • 211 |
  • Importance: low
  • 212 |
213 |
214 |
regex.separator
215 |

Character separator to use with regex.patterns and regex.replacements.

216 |
    217 |
  • Type: string
  • 218 |
  • Default: ~
  • 219 |
  • Importance: low
  • 220 |
221 |
222 |
223 |
224 |
225 |

Retries

226 |
227 |
max.retries
228 |

The maximum number of times to retry on errors before failing the task.

229 |
    230 |
  • Type: int
  • 231 |
  • Default: 10
  • 232 |
  • Valid Values: [0,…]
  • 233 |
  • Importance: medium
  • 234 |
235 |
236 |
retry.backoff.ms
237 |

The time in milliseconds to wait following an error before a retry attempt is made.

238 |
    239 |
  • Type: int
  • 240 |
  • Default: 3000
  • 241 |
  • Valid Values: [0,…]
  • 242 |
  • Importance: medium
  • 243 |
244 |
245 |
246 |
247 |
248 |

Batching

249 |
250 |
batch.key.pattern
251 |

Pattern used to build the key for a given batch. ${key} and ${topic} can be used to include message attributes here.

252 |
    253 |
  • Type: string
  • 254 |
  • Default: someKey
  • 255 |
  • Importance: high
  • 256 |
257 |
258 |
batch.max.size
259 |

The number of records accumulated in a batch before the HTTP API will be invoked.

260 |
    261 |
  • Type: int
  • 262 |
  • Default: 1
  • 263 |
  • Valid Values: [0,…]
  • 264 |
  • Importance: high
  • 265 |
266 |
267 |
batch.prefix
268 |

Prefix added to record batches. This will be applied once at the beginning of the batch of records.

269 |
    270 |
  • Type: string
  • 271 |
  • Importance: high
  • 272 |
273 |
274 |
batch.suffix
275 |

Suffix added to record batches. This will be applied once at the end of the batch of records.

276 |
    277 |
  • Type: string
  • 278 |
  • Importance: high
  • 279 |
280 |
281 |
batch.seperator
282 |

Seperator for records in a batch.

283 |
    284 |
  • Type: string
  • 285 |
  • Default: ,
  • 286 |
  • Importance: high
  • 287 |
288 |
289 |
290 |
291 |
292 | 293 | 294 |
295 | 296 |
297 | 320 | 321 |
322 |
323 | 324 |
325 | 326 |
327 | 328 | 329 | 330 | 331 | 332 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 356 | 357 | 358 | -------------------------------------------------------------------------------- /docs/sources/changelog.rst.txt: -------------------------------------------------------------------------------- 1 | .. _http_connector_changelog: 2 | 3 | Changelog 4 | ========= 5 | 6 | Version 5.2.1 7 | ------------- 8 | 9 | * Removed batch.linger.ms property to prevent potential scenario where messages can have offsets committed without being sent during task failure. 10 | 11 | Version 5.2.0 12 | ------------- 13 | 14 | * Changed versioning to match tested Confluent Platform version 15 | * Added batching options 16 | 17 | Version 1.0.0 18 | ------------- -------------------------------------------------------------------------------- /docs/sources/includes/prerequisites.rst.txt: -------------------------------------------------------------------------------- 1 | .. Prerequisites for using HTTP connector 2 | 3 | **Prerequisites:** 4 | 5 | - :ref:`Confluent Platform ` is installed and services are running. This quick start assumes that you are 6 | using cp-demo , but standalone installations are also supported. 7 | -------------------------------------------------------------------------------- /docs/sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. _connect_HTTP: 2 | 3 | Kafka Connect HTTP Connector 4 | ======================== 5 | 6 | Contents: 7 | 8 | .. toctree:: 9 | :maxdepth: 3 10 | 11 | sink_connector 12 | sink_config_options 13 | changelog 14 | -------------------------------------------------------------------------------- /docs/sources/sink_config_options.rst.txt: -------------------------------------------------------------------------------- 1 | .. _sink-config-options: 2 | 3 | HTTP Sink Configuration Options 4 | ------------------------------- 5 | 6 | Connection 7 | ^^^^^^^^^^ 8 | 9 | ``http.api.url`` 10 | HTTP API base url. 11 | 12 | * Type: string 13 | * Importance: high 14 | 15 | ``request.method`` 16 | Request method used to interactr with the HTTP API (PUT/POST/DELETE). 17 | 18 | * Type: string 19 | * Default: POST 20 | * Importance: high 21 | 22 | ``headers`` 23 | HTTP Request Headers. 24 | 25 | * Type: string 26 | * Default: null 27 | * Importance: low 28 | 29 | ``header.separator`` 30 | Seperator used in the headers property. 31 | 32 | * Type: string 33 | * Default: | 34 | * Importance: low 35 | 36 | Regex 37 | ^^^^^ 38 | 39 | ``regex.patterns`` 40 | Character separated list of regex patterns to match in the payload. 41 | 42 | * Type: string 43 | * Importance: low 44 | 45 | ``regex.replacements`` 46 | Character separated list of string to use as replacements for the matches to the patterns in regex.patterns. 47 | 48 | * Type: string 49 | * Importance: low 50 | 51 | ``regex.separator`` 52 | Character separator to use with regex.patterns and regex.replacements. 53 | 54 | * Type: string 55 | * Default: ~ 56 | * Importance: low 57 | 58 | Retries 59 | ^^^^^^^ 60 | 61 | ``max.retries`` 62 | The maximum number of times to retry on errors before failing the task. 63 | 64 | * Type: int 65 | * Default: 10 66 | * Valid Values: [0,...] 67 | * Importance: medium 68 | 69 | ``retry.backoff.ms`` 70 | The time in milliseconds to wait following an error before a retry attempt is made. 71 | 72 | * Type: int 73 | * Default: 3000 74 | * Valid Values: [0,...] 75 | * Importance: medium 76 | 77 | Batching 78 | ^^^^^^^^ 79 | 80 | ``batch.key.pattern`` 81 | Pattern used to build the key for a given batch. ${key} and ${topic} can be used to include message attributes here. 82 | 83 | * Type: string 84 | * Default: someKey 85 | * Importance: high 86 | 87 | ``batch.max.size`` 88 | The number of records accumulated in a batch before the HTTP API will be invoked. 89 | 90 | * Type: int 91 | * Default: 1 92 | * Valid Values: [0,...] 93 | * Importance: high 94 | 95 | ``batch.prefix`` 96 | Prefix added to record batches. This will be applied once at the beginning of the batch of records. 97 | 98 | * Type: string 99 | * Importance: high 100 | 101 | ``batch.suffix`` 102 | Suffix added to record batches. This will be applied once at the end of the batch of records. 103 | 104 | * Type: string 105 | * Importance: high 106 | 107 | ``batch.seperator`` 108 | Seperator for records in a batch. 109 | 110 | * Type: string 111 | * Default: , 112 | * Importance: high 113 | 114 | -------------------------------------------------------------------------------- /docs/sources/sink_connector.rst.txt: -------------------------------------------------------------------------------- 1 | HTTP Sink Connector 2 | =================== 3 | 4 | The HTTP sink connector allows you to export data from Kafka topics to HTTP based APIS. 5 | The connector polls data from Kafka to write to the API based on the topics subscription. 6 | 7 | Quick Start - Poor mans's Replicator 8 | ------------------------------------ 9 | 10 | .. include:: includes/prerequisites.rst 11 | 12 | 13 | Confluent Replicator is a fully featured solution to replicate messages between topics and clusters. To see the basic 14 | functionality of the HTTP connector, we'll be creating our own replicator using the HTTP Connector to produce messages 15 | from a source topic to the REST Proxy instance in cp-demo. 16 | 17 | --------------------------------- 18 | Create the source and sink topics 19 | --------------------------------- 20 | 21 | Before we can replicate data we need to create source and destination topics and create some input data. 22 | From inside a cp-demo broker container (``docker-compose exec kafka1 bash``): 23 | 24 | #. Create topics: 25 | 26 | .. sourcecode:: bash 27 | 28 | kafka-topics --zookeeper zookeeper:2181 --topic jsontest.source --create --replication-factor 1 --partitions 1 29 | kafka-topics --zookeeper zookeeper:2181 --topic jsontest.replica --create --replication-factor 1 --partitions 1 30 | 31 | #. Input some source data: 32 | 33 | .. sourcecode:: bash 34 | 35 | kafka-console-producer --broker-list localhost:10091 --topic jsontest.source 36 | >{"foo1":"bar1"} 37 | >{"foo2":"bar2"} 38 | >{"foo3":"bar3"} 39 | >{"foo4":"bar4"} 40 | >{"foo5":"bar5"} 41 | 42 | #. Start a console consumer to monitor the output from the connector: 43 | 44 | .. sourcecode:: bash 45 | 46 | kafka-console-consumer --bootstrap-server localhost:10091 --topic jsontest.replica --from-beginning 47 | 48 | ---------------------------- 49 | Load the HTTP Sink Connector 50 | ---------------------------- 51 | 52 | Now we submit the HTTP connector to the cp-demo connect instance: 53 | 54 | #. From outside the container: 55 | 56 | .. sourcecode:: bash 57 | 58 | curl -X POST -H "Content-Type: application/json" --data '{ \ 59 | "name": "http-sink", \ 60 | "config": { \ 61 | "connector.class":"uk.co.threefi.connect.http.HttpSinkConnector", \ 62 | "tasks.max":"1", \ 63 | "http.api.url":"https://restproxy:8086/topics/jsontest.replica", \ 64 | "topics":"jsontest.source", \ 65 | "request.method":"POST", \ 66 | "headers":"Content-Type:application/vnd.kafka.json.v2+json|Accept:application/vnd.kafka.v2+json", \ 67 | "value.converter":"org.apache.kafka.connect.storage.StringConverter", \ 68 | "batch.prefix":"{\"records\":[", \ 69 | "batch.suffix":"]}", \ 70 | "batch.max.size":"5", \ 71 | "regex.patterns":"^~$", \ 72 | "regex.replacements":"{\"value\":~}", \ 73 | "regex.separator":"~" }}' \ 74 | http://localhost:8083/connectors 75 | 76 | Your output should resemble: 77 | 78 | .. sourcecode:: bash 79 | 80 | { \ 81 | "name":"http-sink", \ 82 | "config":{ \ 83 | "connector.class":"uk.co.threefi.connect.http.HttpSinkConnector", \ 84 | "tasks.max":"1", \ 85 | "http.api.url":"https://restproxy:8086/topics/jsontest.replica", \ 86 | "topics":"jsontest.source", \ 87 | "request.method":"POST", \ 88 | "headers":"Content-Type:application/vnd.kafka.json.v2+json|Accept:application/vnd.kafka.v2+json", \ 89 | "value.converter":"org.apache.kafka.connect.storage.StringConverter", \ 90 | "batch.prefix":"{\"records\":[", \ 91 | "batch.suffix":"]}", \ 92 | "batch.max.size":"5", \ 93 | "regex.patterns":"^~$", \ 94 | "regex.replacements":"{\"value\":~}", \ 95 | "regex.separator":"~", \ 96 | "name":"http-sink"}, \ 97 | "tasks":[], \ 98 | "type":null \ 99 | } 100 | 101 | .. tip:: Note the regex configurations. REST Proxy expects data to be wrapped in a structure as below: 102 | 103 | .. sourcecode:: bash 104 | 105 | {"records":[{"value":{"foo1":"bar1"}},{"value":{"foo2":"bar2"}}]} 106 | 107 | The regex configurations and batching parameters create this structure around the original messages. 108 | 109 | ------------------- 110 | Confirm the results 111 | ------------------- 112 | 113 | In your earlier opened console consumer you should see the following: 114 | 115 | .. sourcecode:: bash 116 | 117 | {"foo1":"bar1"} 118 | {"foo2":"bar2"} 119 | {"foo3":"bar3"} 120 | {"foo4":"bar4"} 121 | {"foo5":"bar5"} 122 | 123 | .. tip:: In this example we have configured ``batch.max.size`` to 5. This means, if you produce more than 5 messages in 124 | a way in which connect will see them in a signle fetch (e.g. by producing them before starting the connector. 125 | You will see batches of 5 messages submitted as single calls to the HTTP API. 126 | 127 | -------- 128 | Features 129 | -------- 130 | 131 | ----------------------- 132 | Key/Topic substitutions 133 | ----------------------- 134 | 135 | The special strings ``${key}`` and ``${topic}`` can be used in the http.api.url and regex.replacements property to 136 | inject metadata into the destinationAPI. 137 | 138 | ------------------ 139 | Regex Replacements 140 | ------------------ 141 | 142 | The HTTP Sink connector can take a number of regex patterns and replacement strings that are applied the the message 143 | before being submitted to the destination API. For more information see the configuration options ``regex.patterns``, 144 | ``regex.replacements`` and ``regex.separator`` 145 | 146 | -------- 147 | Batching 148 | -------- 149 | 150 | The HTTP Sink connector batches up requests submitted to HTTP APIs for efficiency. Batches can be built with custom 151 | separators, prefixes and suffixes. For more information see the configuration options ``batch.prefix``, ``batch.suffix`` 152 | and ``batch.separator``. 153 | 154 | You can also control when batches are submitted with configuration for maximum size of a batch. For more information 155 | see the configuration option ``batch.max.size`` 156 | 157 | All regex options mentioned above still apply when batching and will be applied to individual messages before being 158 | submitted to the batch. 159 | -------------------------------------------------------------------------------- /docs/static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | /* -- relbar ---------------------------------------------------------------- */ 19 | 20 | div.related { 21 | width: 100%; 22 | font-size: 90%; 23 | } 24 | 25 | div.related h3 { 26 | display: none; 27 | } 28 | 29 | div.related ul { 30 | margin: 0; 31 | padding: 0 0 0 10px; 32 | list-style: none; 33 | } 34 | 35 | div.related li { 36 | display: inline; 37 | } 38 | 39 | div.related li.right { 40 | float: right; 41 | margin-right: 5px; 42 | } 43 | 44 | /* -- sidebar --------------------------------------------------------------- */ 45 | 46 | div.sphinxsidebarwrapper { 47 | padding: 10px 5px 0 10px; 48 | } 49 | 50 | div.sphinxsidebar { 51 | float: left; 52 | width: 230px; 53 | margin-left: -100%; 54 | font-size: 90%; 55 | word-wrap: break-word; 56 | overflow-wrap : break-word; 57 | } 58 | 59 | div.sphinxsidebar ul { 60 | list-style: none; 61 | } 62 | 63 | div.sphinxsidebar ul ul, 64 | div.sphinxsidebar ul.want-points { 65 | margin-left: 20px; 66 | list-style: square; 67 | } 68 | 69 | div.sphinxsidebar ul ul { 70 | margin-top: 0; 71 | margin-bottom: 0; 72 | } 73 | 74 | div.sphinxsidebar form { 75 | margin-top: 10px; 76 | } 77 | 78 | div.sphinxsidebar input { 79 | border: 1px solid #98dbcc; 80 | font-family: sans-serif; 81 | font-size: 1em; 82 | } 83 | 84 | div.sphinxsidebar #searchbox input[type="text"] { 85 | float: left; 86 | width: 80%; 87 | padding: 0.25em; 88 | box-sizing: border-box; 89 | } 90 | 91 | div.sphinxsidebar #searchbox input[type="submit"] { 92 | float: left; 93 | width: 20%; 94 | border-left: none; 95 | padding: 0.25em; 96 | box-sizing: border-box; 97 | } 98 | 99 | 100 | img { 101 | border: 0; 102 | max-width: 100%; 103 | } 104 | 105 | /* -- search page ----------------------------------------------------------- */ 106 | 107 | ul.search { 108 | margin: 10px 0 0 20px; 109 | padding: 0; 110 | } 111 | 112 | ul.search li { 113 | padding: 5px 0 5px 20px; 114 | background-image: url(file.png); 115 | background-repeat: no-repeat; 116 | background-position: 0 7px; 117 | } 118 | 119 | ul.search li a { 120 | font-weight: bold; 121 | } 122 | 123 | ul.search li div.context { 124 | color: #888; 125 | margin: 2px 0 0 30px; 126 | text-align: left; 127 | } 128 | 129 | ul.keywordmatches li.goodmatch a { 130 | font-weight: bold; 131 | } 132 | 133 | /* -- index page ------------------------------------------------------------ */ 134 | 135 | table.contentstable { 136 | width: 90%; 137 | margin-left: auto; 138 | margin-right: auto; 139 | } 140 | 141 | table.contentstable p.biglink { 142 | line-height: 150%; 143 | } 144 | 145 | a.biglink { 146 | font-size: 1.3em; 147 | } 148 | 149 | span.linkdescr { 150 | font-style: italic; 151 | padding-top: 5px; 152 | font-size: 90%; 153 | } 154 | 155 | /* -- general index --------------------------------------------------------- */ 156 | 157 | table.indextable { 158 | width: 100%; 159 | } 160 | 161 | table.indextable td { 162 | text-align: left; 163 | vertical-align: top; 164 | } 165 | 166 | table.indextable ul { 167 | margin-top: 0; 168 | margin-bottom: 0; 169 | list-style-type: none; 170 | } 171 | 172 | table.indextable > tbody > tr > td > ul { 173 | padding-left: 0em; 174 | } 175 | 176 | table.indextable tr.pcap { 177 | height: 10px; 178 | } 179 | 180 | table.indextable tr.cap { 181 | margin-top: 10px; 182 | background-color: #f2f2f2; 183 | } 184 | 185 | img.toggler { 186 | margin-right: 3px; 187 | margin-top: 3px; 188 | cursor: pointer; 189 | } 190 | 191 | div.modindex-jumpbox { 192 | border-top: 1px solid #ddd; 193 | border-bottom: 1px solid #ddd; 194 | margin: 1em 0 1em 0; 195 | padding: 0.4em; 196 | } 197 | 198 | div.genindex-jumpbox { 199 | border-top: 1px solid #ddd; 200 | border-bottom: 1px solid #ddd; 201 | margin: 1em 0 1em 0; 202 | padding: 0.4em; 203 | } 204 | 205 | /* -- domain module index --------------------------------------------------- */ 206 | 207 | table.modindextable td { 208 | padding: 2px; 209 | border-collapse: collapse; 210 | } 211 | 212 | /* -- general body styles --------------------------------------------------- */ 213 | 214 | div.body { 215 | min-width: 450px; 216 | max-width: 800px; 217 | } 218 | 219 | div.body p, div.body dd, div.body li, div.body blockquote { 220 | -moz-hyphens: auto; 221 | -ms-hyphens: auto; 222 | -webkit-hyphens: auto; 223 | hyphens: auto; 224 | } 225 | 226 | a.headerlink { 227 | visibility: hidden; 228 | } 229 | 230 | h1:hover > a.headerlink, 231 | h2:hover > a.headerlink, 232 | h3:hover > a.headerlink, 233 | h4:hover > a.headerlink, 234 | h5:hover > a.headerlink, 235 | h6:hover > a.headerlink, 236 | dt:hover > a.headerlink, 237 | caption:hover > a.headerlink, 238 | p.caption:hover > a.headerlink, 239 | div.code-block-caption:hover > a.headerlink { 240 | visibility: visible; 241 | } 242 | 243 | div.body p.caption { 244 | text-align: inherit; 245 | } 246 | 247 | div.body td { 248 | text-align: left; 249 | } 250 | 251 | .first { 252 | margin-top: 0 !important; 253 | } 254 | 255 | p.rubric { 256 | margin-top: 30px; 257 | font-weight: bold; 258 | } 259 | 260 | img.align-left, .figure.align-left, object.align-left { 261 | clear: left; 262 | float: left; 263 | margin-right: 1em; 264 | } 265 | 266 | img.align-right, .figure.align-right, object.align-right { 267 | clear: right; 268 | float: right; 269 | margin-left: 1em; 270 | } 271 | 272 | img.align-center, .figure.align-center, object.align-center { 273 | display: block; 274 | margin-left: auto; 275 | margin-right: auto; 276 | } 277 | 278 | .align-left { 279 | text-align: left; 280 | } 281 | 282 | .align-center { 283 | text-align: center; 284 | } 285 | 286 | .align-right { 287 | text-align: right; 288 | } 289 | 290 | /* -- sidebars -------------------------------------------------------------- */ 291 | 292 | div.sidebar { 293 | margin: 0 0 0.5em 1em; 294 | border: 1px solid #ddb; 295 | padding: 7px 7px 0 7px; 296 | background-color: #ffe; 297 | width: 40%; 298 | float: right; 299 | } 300 | 301 | p.sidebar-title { 302 | font-weight: bold; 303 | } 304 | 305 | /* -- topics ---------------------------------------------------------------- */ 306 | 307 | div.topic { 308 | border: 1px solid #ccc; 309 | padding: 7px 7px 0 7px; 310 | margin: 10px 0 10px 0; 311 | } 312 | 313 | p.topic-title { 314 | font-size: 1.1em; 315 | font-weight: bold; 316 | margin-top: 10px; 317 | } 318 | 319 | /* -- admonitions ----------------------------------------------------------- */ 320 | 321 | div.admonition { 322 | margin-top: 10px; 323 | margin-bottom: 10px; 324 | padding: 7px; 325 | } 326 | 327 | div.admonition dt { 328 | font-weight: bold; 329 | } 330 | 331 | div.admonition dl { 332 | margin-bottom: 0; 333 | } 334 | 335 | p.admonition-title { 336 | margin: 0px 10px 5px 0px; 337 | font-weight: bold; 338 | } 339 | 340 | div.body p.centered { 341 | text-align: center; 342 | margin-top: 25px; 343 | } 344 | 345 | /* -- tables ---------------------------------------------------------------- */ 346 | 347 | table.docutils { 348 | border: 0; 349 | border-collapse: collapse; 350 | } 351 | 352 | table.align-center { 353 | margin-left: auto; 354 | margin-right: auto; 355 | } 356 | 357 | table caption span.caption-number { 358 | font-style: italic; 359 | } 360 | 361 | table caption span.caption-text { 362 | } 363 | 364 | table.docutils td, table.docutils th { 365 | padding: 1px 8px 1px 5px; 366 | border-top: 0; 367 | border-left: 0; 368 | border-right: 0; 369 | border-bottom: 1px solid #aaa; 370 | } 371 | 372 | table.footnote td, table.footnote th { 373 | border: 0 !important; 374 | } 375 | 376 | th { 377 | text-align: left; 378 | padding-right: 5px; 379 | } 380 | 381 | table.citation { 382 | border-left: solid 1px gray; 383 | margin-left: 1px; 384 | } 385 | 386 | table.citation td { 387 | border-bottom: none; 388 | } 389 | 390 | /* -- figures --------------------------------------------------------------- */ 391 | 392 | div.figure { 393 | margin: 0.5em; 394 | padding: 0.5em; 395 | } 396 | 397 | div.figure p.caption { 398 | padding: 0.3em; 399 | } 400 | 401 | div.figure p.caption span.caption-number { 402 | font-style: italic; 403 | } 404 | 405 | div.figure p.caption span.caption-text { 406 | } 407 | 408 | /* -- field list styles ----------------------------------------------------- */ 409 | 410 | table.field-list td, table.field-list th { 411 | border: 0 !important; 412 | } 413 | 414 | .field-list ul { 415 | margin: 0; 416 | padding-left: 1em; 417 | } 418 | 419 | .field-list p { 420 | margin: 0; 421 | } 422 | 423 | .field-name { 424 | -moz-hyphens: manual; 425 | -ms-hyphens: manual; 426 | -webkit-hyphens: manual; 427 | hyphens: manual; 428 | } 429 | 430 | /* -- other body styles ----------------------------------------------------- */ 431 | 432 | ol.arabic { 433 | list-style: decimal; 434 | } 435 | 436 | ol.loweralpha { 437 | list-style: lower-alpha; 438 | } 439 | 440 | ol.upperalpha { 441 | list-style: upper-alpha; 442 | } 443 | 444 | ol.lowerroman { 445 | list-style: lower-roman; 446 | } 447 | 448 | ol.upperroman { 449 | list-style: upper-roman; 450 | } 451 | 452 | dl { 453 | margin-bottom: 15px; 454 | } 455 | 456 | dd p { 457 | margin-top: 0px; 458 | } 459 | 460 | dd ul, dd table { 461 | margin-bottom: 10px; 462 | } 463 | 464 | dd { 465 | margin-top: 3px; 466 | margin-bottom: 10px; 467 | margin-left: 30px; 468 | } 469 | 470 | dt:target, span.highlighted { 471 | background-color: #fbe54e; 472 | } 473 | 474 | rect.highlighted { 475 | fill: #fbe54e; 476 | } 477 | 478 | dl.glossary dt { 479 | font-weight: bold; 480 | font-size: 1.1em; 481 | } 482 | 483 | .optional { 484 | font-size: 1.3em; 485 | } 486 | 487 | .sig-paren { 488 | font-size: larger; 489 | } 490 | 491 | .versionmodified { 492 | font-style: italic; 493 | } 494 | 495 | .system-message { 496 | background-color: #fda; 497 | padding: 5px; 498 | border: 3px solid red; 499 | } 500 | 501 | .footnote:target { 502 | background-color: #ffa; 503 | } 504 | 505 | .line-block { 506 | display: block; 507 | margin-top: 1em; 508 | margin-bottom: 1em; 509 | } 510 | 511 | .line-block .line-block { 512 | margin-top: 0; 513 | margin-bottom: 0; 514 | margin-left: 1.5em; 515 | } 516 | 517 | .guilabel, .menuselection { 518 | font-family: sans-serif; 519 | } 520 | 521 | .accelerator { 522 | text-decoration: underline; 523 | } 524 | 525 | .classifier { 526 | font-style: oblique; 527 | } 528 | 529 | abbr, acronym { 530 | border-bottom: dotted 1px; 531 | cursor: help; 532 | } 533 | 534 | /* -- code displays --------------------------------------------------------- */ 535 | 536 | pre { 537 | overflow: auto; 538 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 539 | } 540 | 541 | span.pre { 542 | -moz-hyphens: none; 543 | -ms-hyphens: none; 544 | -webkit-hyphens: none; 545 | hyphens: none; 546 | } 547 | 548 | td.linenos pre { 549 | padding: 5px 0px; 550 | border: 0; 551 | background-color: transparent; 552 | color: #aaa; 553 | } 554 | 555 | table.highlighttable { 556 | margin-left: 0.5em; 557 | } 558 | 559 | table.highlighttable td { 560 | padding: 0 0.5em 0 0.5em; 561 | } 562 | 563 | div.code-block-caption { 564 | padding: 2px 5px; 565 | font-size: small; 566 | } 567 | 568 | div.code-block-caption code { 569 | background-color: transparent; 570 | } 571 | 572 | div.code-block-caption + div > div.highlight > pre { 573 | margin-top: 0; 574 | } 575 | 576 | div.code-block-caption span.caption-number { 577 | padding: 0.1em 0.3em; 578 | font-style: italic; 579 | } 580 | 581 | div.code-block-caption span.caption-text { 582 | } 583 | 584 | div.literal-block-wrapper { 585 | padding: 1em 1em 0; 586 | } 587 | 588 | div.literal-block-wrapper div.highlight { 589 | margin: 0; 590 | } 591 | 592 | code.descname { 593 | background-color: transparent; 594 | font-weight: bold; 595 | font-size: 1.2em; 596 | } 597 | 598 | code.descclassname { 599 | background-color: transparent; 600 | } 601 | 602 | code.xref, a code { 603 | background-color: transparent; 604 | font-weight: bold; 605 | } 606 | 607 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 608 | background-color: transparent; 609 | } 610 | 611 | .viewcode-link { 612 | float: right; 613 | } 614 | 615 | .viewcode-back { 616 | float: right; 617 | font-family: sans-serif; 618 | } 619 | 620 | div.viewcode-block:target { 621 | margin: -1px -10px; 622 | padding: 0 10px; 623 | } 624 | 625 | /* -- math display ---------------------------------------------------------- */ 626 | 627 | img.math { 628 | vertical-align: middle; 629 | } 630 | 631 | div.body div.math p { 632 | text-align: center; 633 | } 634 | 635 | span.eqno { 636 | float: right; 637 | } 638 | 639 | span.eqno a.headerlink { 640 | position: relative; 641 | left: 0px; 642 | z-index: 1; 643 | } 644 | 645 | div.math:hover a.headerlink { 646 | visibility: visible; 647 | } 648 | 649 | /* -- printout stylesheet --------------------------------------------------- */ 650 | 651 | @media print { 652 | div.document, 653 | div.documentwrapper, 654 | div.bodywrapper { 655 | margin: 0 !important; 656 | width: 100%; 657 | } 658 | 659 | div.sphinxsidebar, 660 | div.related, 661 | div.footer, 662 | #top-link { 663 | display: none; 664 | } 665 | } -------------------------------------------------------------------------------- /docs/static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/comment-bright.png -------------------------------------------------------------------------------- /docs/static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/comment-close.png -------------------------------------------------------------------------------- /docs/static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/comment.png -------------------------------------------------------------------------------- /docs/static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} 2 | -------------------------------------------------------------------------------- /docs/static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s === 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node, addItems) { 70 | if (node.nodeType === 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && 74 | !jQuery(node.parentNode).hasClass(className) && 75 | !jQuery(node.parentNode).hasClass("nohighlight")) { 76 | var span; 77 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 78 | if (isInSVG) { 79 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 80 | } else { 81 | span = document.createElement("span"); 82 | span.className = className; 83 | } 84 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 85 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 86 | document.createTextNode(val.substr(pos + text.length)), 87 | node.nextSibling)); 88 | node.nodeValue = val.substr(0, pos); 89 | if (isInSVG) { 90 | var bbox = span.getBBox(); 91 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 92 | rect.x.baseVal.value = bbox.x; 93 | rect.y.baseVal.value = bbox.y; 94 | rect.width.baseVal.value = bbox.width; 95 | rect.height.baseVal.value = bbox.height; 96 | rect.setAttribute('class', className); 97 | var parentOfText = node.parentNode.parentNode; 98 | addItems.push({ 99 | "parent": node.parentNode, 100 | "target": rect}); 101 | } 102 | } 103 | } 104 | else if (!jQuery(node).is("button, select, textarea")) { 105 | jQuery.each(node.childNodes, function() { 106 | highlight(this, addItems); 107 | }); 108 | } 109 | } 110 | var addItems = []; 111 | var result = this.each(function() { 112 | highlight(this, addItems); 113 | }); 114 | for (var i = 0; i < addItems.length; ++i) { 115 | jQuery(addItems[i].parent).before(addItems[i].target); 116 | } 117 | return result; 118 | }; 119 | 120 | /* 121 | * backward compatibility for jQuery.browser 122 | * This will be supported until firefox bug is fixed. 123 | */ 124 | if (!jQuery.browser) { 125 | jQuery.uaMatch = function(ua) { 126 | ua = ua.toLowerCase(); 127 | 128 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 129 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 130 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 131 | /(msie) ([\w.]+)/.exec(ua) || 132 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 133 | []; 134 | 135 | return { 136 | browser: match[ 1 ] || "", 137 | version: match[ 2 ] || "0" 138 | }; 139 | }; 140 | jQuery.browser = {}; 141 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 142 | } 143 | 144 | /** 145 | * Small JavaScript module for the documentation. 146 | */ 147 | var Documentation = { 148 | 149 | init : function() { 150 | this.fixFirefoxAnchorBug(); 151 | this.highlightSearchWords(); 152 | this.initIndexTable(); 153 | 154 | }, 155 | 156 | /** 157 | * i18n support 158 | */ 159 | TRANSLATIONS : {}, 160 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, 161 | LOCALE : 'unknown', 162 | 163 | // gettext and ngettext don't access this so that the functions 164 | // can safely bound to a different name (_ = Documentation.gettext) 165 | gettext : function(string) { 166 | var translated = Documentation.TRANSLATIONS[string]; 167 | if (typeof translated === 'undefined') 168 | return string; 169 | return (typeof translated === 'string') ? translated : translated[0]; 170 | }, 171 | 172 | ngettext : function(singular, plural, n) { 173 | var translated = Documentation.TRANSLATIONS[singular]; 174 | if (typeof translated === 'undefined') 175 | return (n == 1) ? singular : plural; 176 | return translated[Documentation.PLURALEXPR(n)]; 177 | }, 178 | 179 | addTranslations : function(catalog) { 180 | for (var key in catalog.messages) 181 | this.TRANSLATIONS[key] = catalog.messages[key]; 182 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 183 | this.LOCALE = catalog.locale; 184 | }, 185 | 186 | /** 187 | * add context elements like header anchor links 188 | */ 189 | addContextElements : function() { 190 | $('div[id] > :header:first').each(function() { 191 | $('\u00B6'). 192 | attr('href', '#' + this.id). 193 | attr('title', _('Permalink to this headline')). 194 | appendTo(this); 195 | }); 196 | $('dt[id]').each(function() { 197 | $('\u00B6'). 198 | attr('href', '#' + this.id). 199 | attr('title', _('Permalink to this definition')). 200 | appendTo(this); 201 | }); 202 | }, 203 | 204 | /** 205 | * workaround a firefox stupidity 206 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 207 | */ 208 | fixFirefoxAnchorBug : function() { 209 | if (document.location.hash && $.browser.mozilla) 210 | window.setTimeout(function() { 211 | document.location.href += ''; 212 | }, 10); 213 | }, 214 | 215 | /** 216 | * highlight the search words provided in the url in the text 217 | */ 218 | highlightSearchWords : function() { 219 | var params = $.getQueryParameters(); 220 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 221 | if (terms.length) { 222 | var body = $('div.body'); 223 | if (!body.length) { 224 | body = $('body'); 225 | } 226 | window.setTimeout(function() { 227 | $.each(terms, function() { 228 | body.highlightText(this.toLowerCase(), 'highlighted'); 229 | }); 230 | }, 10); 231 | $('') 233 | .appendTo($('#searchbox')); 234 | } 235 | }, 236 | 237 | /** 238 | * init the domain index toggle buttons 239 | */ 240 | initIndexTable : function() { 241 | var togglers = $('img.toggler').click(function() { 242 | var src = $(this).attr('src'); 243 | var idnum = $(this).attr('id').substr(7); 244 | $('tr.cg-' + idnum).toggle(); 245 | if (src.substr(-9) === 'minus.png') 246 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 247 | else 248 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 249 | }).css('display', ''); 250 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 251 | togglers.click(); 252 | } 253 | }, 254 | 255 | /** 256 | * helper function to hide the search marks again 257 | */ 258 | hideSearchWords : function() { 259 | $('#searchbox .highlight-link').fadeOut(300); 260 | $('span.highlighted').removeClass('highlighted'); 261 | }, 262 | 263 | /** 264 | * make the url absolute 265 | */ 266 | makeURL : function(relativeURL) { 267 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 268 | }, 269 | 270 | /** 271 | * get the current relative url 272 | */ 273 | getCurrentURL : function() { 274 | var path = document.location.pathname; 275 | var parts = path.split(/\//); 276 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 277 | if (this === '..') 278 | parts.pop(); 279 | }); 280 | var url = parts.join('/'); 281 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 282 | }, 283 | 284 | initOnKeyListeners: function() { 285 | $(document).keyup(function(event) { 286 | var activeElementType = document.activeElement.tagName; 287 | // don't navigate when in search box or textarea 288 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { 289 | switch (event.keyCode) { 290 | case 37: // left 291 | var prevHref = $('link[rel="prev"]').prop('href'); 292 | if (prevHref) { 293 | window.location.href = prevHref; 294 | return false; 295 | } 296 | case 39: // right 297 | var nextHref = $('link[rel="next"]').prop('href'); 298 | if (nextHref) { 299 | window.location.href = nextHref; 300 | return false; 301 | } 302 | } 303 | } 304 | }); 305 | } 306 | }; 307 | 308 | // quick alias for translations 309 | _ = Documentation.gettext; 310 | 311 | $(document).ready(function() { 312 | Documentation.init(); 313 | }); -------------------------------------------------------------------------------- /docs/static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '5.2.1', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | FILE_SUFFIX: '.html', 7 | HAS_SOURCE: true, 8 | SOURCELINK_SUFFIX: '.txt' 9 | }; -------------------------------------------------------------------------------- /docs/static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/down-pressed.png -------------------------------------------------------------------------------- /docs/static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/down.png -------------------------------------------------------------------------------- /docs/static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/file.png -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bold.eot -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bold.ttf -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bold.woff -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-bolditalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-bolditalic.woff2 -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-italic.eot -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-italic.ttf -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-italic.woff -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-italic.woff2 -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-regular.eot -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-regular.ttf -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-regular.woff -------------------------------------------------------------------------------- /docs/static/fonts/Lato/lato-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/Lato/lato-regular.woff2 -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.eot -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.woff -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.eot -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.woff -------------------------------------------------------------------------------- /docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 -------------------------------------------------------------------------------- /docs/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/static/js/modernizr.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var i=n(this);expand=n(''),expand.on("click",function(n){return e.toggleCurrent(i),n.stopPropagation(),!1}),i.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}i.length>0&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],i=0;i2;a== 12 | null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect= 13 | function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e= 14 | e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck= 15 | function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a, 17 | c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}}; 24 | b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments, 25 | 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)}; 26 | b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"}; 27 | b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a), 28 | function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+ 29 | u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]= 30 | function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain= 31 | true;return this};m.prototype.value=function(){return this._wrapped}}).call(this); 32 | -------------------------------------------------------------------------------- /docs/static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/up-pressed.png -------------------------------------------------------------------------------- /docs/static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/docs/static/up.png -------------------------------------------------------------------------------- /docs_build/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext livehtml 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " livehtml to make standalone HTML files automatically watching for changes" 28 | @echo " dirhtml to make HTML files named index.html in directories" 29 | @echo " singlehtml to make a single large HTML file" 30 | @echo " pickle to make pickle files" 31 | @echo " json to make JSON files" 32 | @echo " htmlhelp to make HTML files and a HTML help project" 33 | @echo " qthelp to make HTML files and a qthelp project" 34 | @echo " devhelp to make HTML files and a Devhelp project" 35 | @echo " epub to make an epub" 36 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 37 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 38 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 39 | @echo " text to make text files" 40 | @echo " man to make manual pages" 41 | @echo " texinfo to make Texinfo files" 42 | @echo " info to make Texinfo files and run them through makeinfo" 43 | @echo " gettext to make PO message catalogs" 44 | @echo " changes to make an overview of all changed/added/deprecated items" 45 | @echo " xml to make Docutils-native XML files" 46 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 47 | @echo " linkcheck to check all external links for integrity" 48 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 49 | 50 | clean: 51 | rm -rf $(BUILDDIR)/* 52 | 53 | html: 54 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 55 | @echo 56 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 57 | 58 | livehtml: 59 | python autoreload.py 60 | 61 | dirhtml: 62 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 63 | @echo 64 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 65 | 66 | singlehtml: 67 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 68 | @echo 69 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 70 | 71 | pickle: 72 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 73 | @echo 74 | @echo "Build finished; now you can process the pickle files." 75 | 76 | json: 77 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 78 | @echo 79 | @echo "Build finished; now you can process the JSON files." 80 | 81 | htmlhelp: 82 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 83 | @echo 84 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 85 | ".hhp project file in $(BUILDDIR)/htmlhelp." 86 | 87 | qthelp: 88 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 89 | @echo 90 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 91 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 92 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/KafkaRESTProxy.qhcp" 93 | @echo "To view the help file:" 94 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/KafkaRESTProxy.qhc" 95 | 96 | devhelp: 97 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 98 | @echo 99 | @echo "Build finished." 100 | @echo "To view the help file:" 101 | @echo "# mkdir -p $$HOME/.local/share/devhelp/KafkaRESTProxy" 102 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/KafkaRESTProxy" 103 | @echo "# devhelp" 104 | 105 | epub: 106 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 107 | @echo 108 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 109 | 110 | latex: 111 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 112 | @echo 113 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 114 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 115 | "(use \`make latexpdf' here to do that automatically)." 116 | 117 | latexpdf: 118 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 119 | @echo "Running LaTeX files through pdflatex..." 120 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 121 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 122 | 123 | latexpdfja: 124 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 125 | @echo "Running LaTeX files through platex and dvipdfmx..." 126 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 127 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 128 | 129 | text: 130 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 131 | @echo 132 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 133 | 134 | man: 135 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 136 | @echo 137 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 138 | 139 | texinfo: 140 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 141 | @echo 142 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 143 | @echo "Run \`make' in that directory to run these through makeinfo" \ 144 | "(use \`make info' here to do that automatically)." 145 | 146 | info: 147 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 148 | @echo "Running Texinfo files through makeinfo..." 149 | make -C $(BUILDDIR)/texinfo info 150 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 151 | 152 | gettext: 153 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 154 | @echo 155 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 156 | 157 | changes: 158 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 159 | @echo 160 | @echo "The overview file is in $(BUILDDIR)/changes." 161 | 162 | linkcheck: 163 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 164 | @echo 165 | @echo "Link check complete; look for any errors in the above output " \ 166 | "or in $(BUILDDIR)/linkcheck/output.txt." 167 | 168 | doctest: 169 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 170 | @echo "Testing of doctests in the sources finished, look at the " \ 171 | "results in $(BUILDDIR)/doctest/output.txt." 172 | 173 | xml: 174 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 175 | @echo 176 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 177 | 178 | pseudoxml: 179 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 180 | @echo 181 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 182 | -------------------------------------------------------------------------------- /docs_build/README.md: -------------------------------------------------------------------------------- 1 | This documentation is built using [Sphinx](http://sphinx-doc.org). It also uses some extensions for theming and REST API 2 | documentation support. 3 | 4 | Start by installing the requirements: 5 | 6 | pip install -r requirements.txt 7 | 8 | Then you can generate the HTML version of the docs: 9 | 10 | make html 11 | 12 | The root of the documentation will be at `_build/html/index.html` 13 | 14 | While editing the documentation, you can get a live preview using python-livepreview. Install the Python library: 15 | 16 | pip install livereload 17 | 18 | Then run the monitoring script in the background: 19 | 20 | python autoreload.py & 21 | 22 | If you install the [browser extensions](http://livereload.com/) then everything should update every time any files are 23 | saved without any manual steps on your part. -------------------------------------------------------------------------------- /docs_build/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /docs_build/autoreload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from livereload import Server, shell 3 | 4 | server = Server() 5 | server.watch('*.rst', shell('make html')) 6 | server.serve() 7 | -------------------------------------------------------------------------------- /docs_build/changelog.rst: -------------------------------------------------------------------------------- 1 | .. _http_connector_changelog: 2 | 3 | Changelog 4 | ========= 5 | 6 | Version 5.2.1 7 | ------------- 8 | 9 | * Removed batch.linger.ms property to prevent potential scenario where messages can have offsets committed without being sent during task failure. 10 | 11 | Version 5.2.0 12 | ------------- 13 | 14 | * Changed versioning to match tested Confluent Platform version 15 | * Added batching options 16 | 17 | Version 1.0.0 18 | ------------- -------------------------------------------------------------------------------- /docs_build/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Kafka Connect HTTP documentation build configuration file, created by 4 | # sphinx-quickstart on Wed Dec 17 14:17:15 2014. 5 | # 6 | # This file is execfile()d with the current directory set to its 7 | # containing dir. 8 | # 9 | # Note that not all possible configuration values are present in this 10 | # autogenerated file. 11 | # 12 | # All configuration values have a default; values that are commented out 13 | # serve to show the default. 14 | 15 | import sys 16 | import os 17 | 18 | # If extensions (or modules to document with autodoc) are in another directory, 19 | # add these directories to sys.path here. If the directory is relative to the 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. 21 | #sys.path.insert(0, os.path.abspath('.')) 22 | 23 | # -- General configuration ------------------------------------------------ 24 | 25 | # If your documentation needs a minimal Sphinx version, state it here. 26 | #needs_sphinx = '1.0' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = ['sphinx.ext.ifconfig', 'sphinxcontrib.httpdomain','sphinxtogithub'] 32 | 33 | def setup(app): 34 | app.add_config_value('platform_docs', True, 'env') 35 | 36 | # Even if it has a default, these options need to be specified 37 | platform_docs = False 38 | 39 | # Add any paths that contain templates here, relative to this directory. 40 | templates_path = ['_templates'] 41 | 42 | # The suffix of source filenames. 43 | source_suffix = '.rst' 44 | 45 | # The encoding of source files. 46 | #source_encoding = 'utf-8-sig' 47 | 48 | # The master toctree document. 49 | master_doc = 'index' 50 | 51 | # General information about the project. 52 | project = u'Kafka Connect HTTP' 53 | copyright = u'2018, 3Fi LTD.' 54 | 55 | # The version info for the project you're documenting, acts as replacement for 56 | # |version| and |release|, also used in various other places throughout the 57 | # built documents. 58 | # 59 | # The short X.Y version. 60 | version = '5.2' 61 | # The full version, including alpha/beta/rc tags. 62 | release = '5.2.1' 63 | 64 | # The language for content autogenerated by Sphinx. Refer to documentation 65 | # for a list of supported languages. 66 | #language = None 67 | 68 | # There are two options for replacing |today|: either, you set today to some 69 | # non-false value, then it is used: 70 | #today = '' 71 | # Else, today_fmt is used as the format for a strftime call. 72 | #today_fmt = '%B %d, %Y' 73 | 74 | # List of patterns, relative to source directory, that match files and 75 | # directories to ignore when looking for source files. 76 | exclude_patterns = ['_build'] 77 | 78 | # The reST default role (used for this markup: `text`) to use for all 79 | # documents. 80 | #default_role = None 81 | 82 | # If true, '()' will be appended to :func: etc. cross-reference text. 83 | #add_function_parentheses = True 84 | 85 | # If true, the current module name will be prepended to all description 86 | # unit titles (such as .. function::). 87 | #add_module_names = True 88 | 89 | # If true, sectionauthor and moduleauthor directives will be shown in the 90 | # output. They are ignored by default. 91 | #show_authors = False 92 | 93 | # The name of the Pygments (syntax highlighting) style to use. 94 | pygments_style = 'sphinx' 95 | 96 | # A list of ignored prefixes for module index sorting. 97 | #modindex_common_prefix = [] 98 | 99 | # If true, keep warnings as "system message" paragraphs in the built documents. 100 | #keep_warnings = False 101 | 102 | 103 | # -- Options for HTML output ---------------------------------------------- 104 | 105 | import sphinx_rtd_theme 106 | 107 | # The theme to use for HTML and HTML Help pages. See the documentation for 108 | # a list of builtin themes. 109 | html_theme = 'sphinx_rtd_theme' 110 | 111 | # Theme options are theme-specific and customize the look and feel of a theme 112 | # further. For a list of options available for each theme, see the 113 | # documentation. 114 | #html_theme_options = {} 115 | 116 | # Add any paths that contain custom themes here, relative to this directory. 117 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 118 | 119 | # The name for this set of Sphinx documents. If None, it defaults to 120 | # " v documentation". 121 | #html_title = None 122 | 123 | # A shorter title for the navigation bar. Default is the same as html_title. 124 | #html_short_title = None 125 | 126 | # The name of an image file (relative to this directory) to place at the top 127 | # of the sidebar. 128 | #html_logo = None 129 | 130 | # The name of an image file (within the static path) to use as favicon of the 131 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 132 | # pixels large. 133 | #html_favicon = None 134 | 135 | # Add any paths that contain custom static files (such as style sheets) here, 136 | # relative to this directory. They are copied after the builtin static files, 137 | # so a file named "default.css" will overwrite the builtin "default.css". 138 | html_static_path = ['_static'] 139 | 140 | # Add any extra paths that contain custom files (such as robots.txt or 141 | # .htaccess) here, relative to this directory. These files are copied 142 | # directly to the root of the documentation. 143 | #html_extra_path = [] 144 | 145 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 146 | # using the given strftime format. 147 | #html_last_updated_fmt = '%b %d, %Y' 148 | 149 | # If true, SmartyPants will be used to convert quotes and dashes to 150 | # typographically correct entities. 151 | #html_use_smartypants = True 152 | 153 | # Custom sidebar templates, maps document names to template names. 154 | #html_sidebars = {} 155 | 156 | # Additional templates that should be rendered to pages, maps page names to 157 | # template names. 158 | #html_additional_pages = {} 159 | 160 | # If false, no module index is generated. 161 | #html_domain_indices = True 162 | 163 | # If false, no index is generated. 164 | #html_use_index = True 165 | 166 | # If true, the index is split into individual pages for each letter. 167 | #html_split_index = False 168 | 169 | # If true, links to the reST sources are added to the pages. 170 | #html_show_sourcelink = True 171 | 172 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 173 | #html_show_sphinx = True 174 | 175 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 176 | #html_show_copyright = True 177 | 178 | # If true, an OpenSearch description file will be output, and all pages will 179 | # contain a tag referring to it. The value of this option must be the 180 | # base URL from which the finished HTML is served. 181 | #html_use_opensearch = '' 182 | 183 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 184 | #html_file_suffix = None 185 | 186 | # Output file base name for HTML help builder. 187 | htmlhelp_basename = 'KafkaConnectHTTPDoc' 188 | 189 | 190 | # -- Options for LaTeX output --------------------------------------------- 191 | 192 | latex_elements = { 193 | # The paper size ('letterpaper' or 'a4paper'). 194 | #'papersize': 'letterpaper', 195 | 196 | # The font size ('10pt', '11pt' or '12pt'). 197 | #'pointsize': '10pt', 198 | 199 | # Additional stuff for the LaTeX preamble. 200 | #'preamble': '', 201 | } 202 | 203 | # Grouping the document tree into LaTeX files. List of tuples 204 | # (source start file, target name, title, 205 | # author, documentclass [howto, manual, or own class]). 206 | latex_documents = [ 207 | ('index', 'KafkaConnectHTTP.tex', u'Kafka Connect HTTP Documentation', 208 | u'3Fi LTD', 'manual'), 209 | ] 210 | 211 | # The name of an image file (relative to this directory) to place at the top of 212 | # the title page. 213 | #latex_logo = None 214 | 215 | # For "manual" documents, if this is true, then toplevel headings are parts, 216 | # not chapters. 217 | #latex_use_parts = False 218 | 219 | # If true, show page references after internal links. 220 | #latex_show_pagerefs = False 221 | 222 | # If true, show URL addresses after external links. 223 | #latex_show_urls = False 224 | 225 | # Documents to append as an appendix to all manuals. 226 | #latex_appendices = [] 227 | 228 | # If false, no module index is generated. 229 | #latex_domain_indices = True 230 | 231 | 232 | # -- Options for manual page output --------------------------------------- 233 | 234 | # One entry per manual page. List of tuples 235 | # (source start file, name, description, authors, manual section). 236 | man_pages = [ 237 | ('index', 'kafkaconnecthttp', u'Kafka Connect HTTP', 238 | [u'3Fi LTD'], 1) 239 | ] 240 | 241 | # If true, show URL addresses after external links. 242 | #man_show_urls = False 243 | 244 | 245 | # -- Options for Texinfo output ------------------------------------------- 246 | 247 | # Grouping the document tree into Texinfo files. List of tuples 248 | # (source start file, target name, title, author, 249 | # dir menu entry, description, category) 250 | texinfo_documents = [ 251 | ('index', 'KafkaConnectHTTP', u'Kafka Connect HTTP Documentation', 252 | u'3Fi LTD', 'KafkaConnectHTTP', 253 | 'Kafka Connector for HTTP sources', 254 | 'Miscellaneous'), 255 | ] 256 | 257 | # Documents to append as an appendix to all manuals. 258 | #texinfo_appendices = [] 259 | 260 | # If false, no module index is generated. 261 | #texinfo_domain_indices = True 262 | 263 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 264 | #texinfo_show_urls = 'footnote' 265 | 266 | # If true, do not generate a @detailmenu in the "Top" node's menu. 267 | #texinfo_no_detailmenu = False 268 | -------------------------------------------------------------------------------- /docs_build/includes/prerequisites.rst: -------------------------------------------------------------------------------- 1 | .. Prerequisites for using HTTP connector 2 | 3 | **Prerequisites:** 4 | 5 | - :ref:`Confluent Platform ` is installed and services are running. This quick start assumes that you are 6 | using cp-demo , but standalone installations are also supported. 7 | -------------------------------------------------------------------------------- /docs_build/index.rst: -------------------------------------------------------------------------------- 1 | .. _connect_HTTP: 2 | 3 | Kafka Connect HTTP Connector 4 | ======================== 5 | 6 | Contents: 7 | 8 | .. toctree:: 9 | :maxdepth: 3 10 | 11 | sink_connector 12 | sink_config_options 13 | changelog 14 | -------------------------------------------------------------------------------- /docs_build/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | goto end 41 | ) 42 | 43 | if "%1" == "clean" ( 44 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 45 | del /q /s %BUILDDIR%\* 46 | goto end 47 | ) 48 | 49 | 50 | %SPHINXBUILD% 2> nul 51 | if errorlevel 9009 ( 52 | echo. 53 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 54 | echo.installed, then set the SPHINXBUILD environment variable to point 55 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 56 | echo.may add the Sphinx directory to PATH. 57 | echo. 58 | echo.If you don't have Sphinx installed, grab it from 59 | echo.http://sphinx-doc.org/ 60 | exit /b 1 61 | ) 62 | 63 | if "%1" == "html" ( 64 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 68 | goto end 69 | ) 70 | 71 | if "%1" == "dirhtml" ( 72 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 76 | goto end 77 | ) 78 | 79 | if "%1" == "singlehtml" ( 80 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 84 | goto end 85 | ) 86 | 87 | if "%1" == "pickle" ( 88 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can process the pickle files. 92 | goto end 93 | ) 94 | 95 | if "%1" == "json" ( 96 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 97 | if errorlevel 1 exit /b 1 98 | echo. 99 | echo.Build finished; now you can process the JSON files. 100 | goto end 101 | ) 102 | 103 | if "%1" == "htmlhelp" ( 104 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 105 | if errorlevel 1 exit /b 1 106 | echo. 107 | echo.Build finished; now you can run HTML Help Workshop with the ^ 108 | .hhp project file in %BUILDDIR%/htmlhelp. 109 | goto end 110 | ) 111 | 112 | if "%1" == "qthelp" ( 113 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 117 | .qhcp project file in %BUILDDIR%/qthelp, like this: 118 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\KafkaRESTProxy.qhcp 119 | echo.To view the help file: 120 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\KafkaRESTProxy.ghc 121 | goto end 122 | ) 123 | 124 | if "%1" == "devhelp" ( 125 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished. 129 | goto end 130 | ) 131 | 132 | if "%1" == "epub" ( 133 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 137 | goto end 138 | ) 139 | 140 | if "%1" == "latex" ( 141 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 145 | goto end 146 | ) 147 | 148 | if "%1" == "latexpdf" ( 149 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 150 | cd %BUILDDIR%/latex 151 | make all-pdf 152 | cd %BUILDDIR%/.. 153 | echo. 154 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 155 | goto end 156 | ) 157 | 158 | if "%1" == "latexpdfja" ( 159 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 160 | cd %BUILDDIR%/latex 161 | make all-pdf-ja 162 | cd %BUILDDIR%/.. 163 | echo. 164 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 165 | goto end 166 | ) 167 | 168 | if "%1" == "text" ( 169 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 170 | if errorlevel 1 exit /b 1 171 | echo. 172 | echo.Build finished. The text files are in %BUILDDIR%/text. 173 | goto end 174 | ) 175 | 176 | if "%1" == "man" ( 177 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 178 | if errorlevel 1 exit /b 1 179 | echo. 180 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 181 | goto end 182 | ) 183 | 184 | if "%1" == "texinfo" ( 185 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 186 | if errorlevel 1 exit /b 1 187 | echo. 188 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 189 | goto end 190 | ) 191 | 192 | if "%1" == "gettext" ( 193 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 194 | if errorlevel 1 exit /b 1 195 | echo. 196 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 197 | goto end 198 | ) 199 | 200 | if "%1" == "changes" ( 201 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 202 | if errorlevel 1 exit /b 1 203 | echo. 204 | echo.The overview file is in %BUILDDIR%/changes. 205 | goto end 206 | ) 207 | 208 | if "%1" == "linkcheck" ( 209 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 210 | if errorlevel 1 exit /b 1 211 | echo. 212 | echo.Link check complete; look for any errors in the above output ^ 213 | or in %BUILDDIR%/linkcheck/output.txt. 214 | goto end 215 | ) 216 | 217 | if "%1" == "doctest" ( 218 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 219 | if errorlevel 1 exit /b 1 220 | echo. 221 | echo.Testing of doctests in the sources finished, look at the ^ 222 | results in %BUILDDIR%/doctest/output.txt. 223 | goto end 224 | ) 225 | 226 | if "%1" == "xml" ( 227 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 228 | if errorlevel 1 exit /b 1 229 | echo. 230 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 231 | goto end 232 | ) 233 | 234 | if "%1" == "pseudoxml" ( 235 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 236 | if errorlevel 1 exit /b 1 237 | echo. 238 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 239 | goto end 240 | ) 241 | 242 | :end 243 | -------------------------------------------------------------------------------- /docs_build/make_docs.sh: -------------------------------------------------------------------------------- 1 | make html 2 | rm -rf ../docs 3 | mv _build/html ../docs 4 | rm -rf _build 5 | -------------------------------------------------------------------------------- /docs_build/requirements.txt: -------------------------------------------------------------------------------- 1 | Sphinx 2 | sphinx_rtd_theme 3 | sphinxcontrib-httpdomain 4 | -------------------------------------------------------------------------------- /docs_build/sink_config_options.rst: -------------------------------------------------------------------------------- 1 | .. _sink-config-options: 2 | 3 | HTTP Sink Configuration Options 4 | ------------------------------- 5 | 6 | Connection 7 | ^^^^^^^^^^ 8 | 9 | ``http.api.url`` 10 | HTTP API base url. 11 | 12 | * Type: string 13 | * Importance: high 14 | 15 | ``request.method`` 16 | Request method used to interactr with the HTTP API (PUT/POST/DELETE). 17 | 18 | * Type: string 19 | * Default: POST 20 | * Importance: high 21 | 22 | ``headers`` 23 | HTTP Request Headers. 24 | 25 | * Type: string 26 | * Default: null 27 | * Importance: low 28 | 29 | ``header.separator`` 30 | Seperator used in the headers property. 31 | 32 | * Type: string 33 | * Default: | 34 | * Importance: low 35 | 36 | Regex 37 | ^^^^^ 38 | 39 | ``regex.patterns`` 40 | Character separated list of regex patterns to match in the payload. 41 | 42 | * Type: string 43 | * Importance: low 44 | 45 | ``regex.replacements`` 46 | Character separated list of string to use as replacements for the matches to the patterns in regex.patterns. 47 | 48 | * Type: string 49 | * Importance: low 50 | 51 | ``regex.separator`` 52 | Character separator to use with regex.patterns and regex.replacements. 53 | 54 | * Type: string 55 | * Default: ~ 56 | * Importance: low 57 | 58 | Retries 59 | ^^^^^^^ 60 | 61 | ``max.retries`` 62 | The maximum number of times to retry on errors before failing the task. 63 | 64 | * Type: int 65 | * Default: 10 66 | * Valid Values: [0,...] 67 | * Importance: medium 68 | 69 | ``retry.backoff.ms`` 70 | The time in milliseconds to wait following an error before a retry attempt is made. 71 | 72 | * Type: int 73 | * Default: 3000 74 | * Valid Values: [0,...] 75 | * Importance: medium 76 | 77 | Batching 78 | ^^^^^^^^ 79 | 80 | ``batch.key.pattern`` 81 | Pattern used to build the key for a given batch. ${key} and ${topic} can be used to include message attributes here. 82 | 83 | * Type: string 84 | * Default: someKey 85 | * Importance: high 86 | 87 | ``batch.max.size`` 88 | The number of records accumulated in a batch before the HTTP API will be invoked. 89 | 90 | * Type: int 91 | * Default: 1 92 | * Valid Values: [0,...] 93 | * Importance: high 94 | 95 | ``batch.prefix`` 96 | Prefix added to record batches. This will be applied once at the beginning of the batch of records. 97 | 98 | * Type: string 99 | * Importance: high 100 | 101 | ``batch.suffix`` 102 | Suffix added to record batches. This will be applied once at the end of the batch of records. 103 | 104 | * Type: string 105 | * Importance: high 106 | 107 | ``batch.seperator`` 108 | Seperator for records in a batch. 109 | 110 | * Type: string 111 | * Default: , 112 | * Importance: high 113 | 114 | -------------------------------------------------------------------------------- /docs_build/sink_connector.rst: -------------------------------------------------------------------------------- 1 | HTTP Sink Connector 2 | =================== 3 | 4 | The HTTP sink connector allows you to export data from Kafka topics to HTTP based APIS. 5 | The connector polls data from Kafka to write to the API based on the topics subscription. 6 | 7 | Quick Start - Poor mans's Replicator 8 | ------------------------------------ 9 | 10 | .. include:: includes/prerequisites.rst 11 | 12 | 13 | Confluent Replicator is a fully featured solution to replicate messages between topics and clusters. To see the basic 14 | functionality of the HTTP connector, we'll be creating our own replicator using the HTTP Connector to produce messages 15 | from a source topic to the REST Proxy instance in cp-demo. 16 | 17 | --------------------------------- 18 | Create the source and sink topics 19 | --------------------------------- 20 | 21 | Before we can replicate data we need to create source and destination topics and create some input data. 22 | From inside a cp-demo broker container (``docker-compose exec kafka1 bash``): 23 | 24 | #. Create topics: 25 | 26 | .. sourcecode:: bash 27 | 28 | kafka-topics --zookeeper zookeeper:2181 --topic jsontest.source --create --replication-factor 1 --partitions 1 29 | kafka-topics --zookeeper zookeeper:2181 --topic jsontest.replica --create --replication-factor 1 --partitions 1 30 | 31 | #. Input some source data: 32 | 33 | .. sourcecode:: bash 34 | 35 | kafka-console-producer --broker-list localhost:10091 --topic jsontest.source 36 | >{"foo1":"bar1"} 37 | >{"foo2":"bar2"} 38 | >{"foo3":"bar3"} 39 | >{"foo4":"bar4"} 40 | >{"foo5":"bar5"} 41 | 42 | #. Start a console consumer to monitor the output from the connector: 43 | 44 | .. sourcecode:: bash 45 | 46 | kafka-console-consumer --bootstrap-server localhost:10091 --topic jsontest.replica --from-beginning 47 | 48 | ---------------------------- 49 | Load the HTTP Sink Connector 50 | ---------------------------- 51 | 52 | Now we submit the HTTP connector to the cp-demo connect instance: 53 | 54 | #. From outside the container: 55 | 56 | .. sourcecode:: bash 57 | 58 | curl -X POST -H "Content-Type: application/json" --data '{ \ 59 | "name": "http-sink", \ 60 | "config": { \ 61 | "connector.class":"uk.co.threefi.connect.http.HttpSinkConnector", \ 62 | "tasks.max":"1", \ 63 | "http.api.url":"https://restproxy:8086/topics/jsontest.replica", \ 64 | "topics":"jsontest.source", \ 65 | "request.method":"POST", \ 66 | "headers":"Content-Type:application/vnd.kafka.json.v2+json|Accept:application/vnd.kafka.v2+json", \ 67 | "value.converter":"org.apache.kafka.connect.storage.StringConverter", \ 68 | "batch.prefix":"{\"records\":[", \ 69 | "batch.suffix":"]}", \ 70 | "batch.max.size":"5", \ 71 | "regex.patterns":"^~$", \ 72 | "regex.replacements":"{\"value\":~}", \ 73 | "regex.separator":"~" }}' \ 74 | http://localhost:8083/connectors 75 | 76 | Your output should resemble: 77 | 78 | .. sourcecode:: bash 79 | 80 | { \ 81 | "name":"http-sink", \ 82 | "config":{ \ 83 | "connector.class":"uk.co.threefi.connect.http.HttpSinkConnector", \ 84 | "tasks.max":"1", \ 85 | "http.api.url":"https://restproxy:8086/topics/jsontest.replica", \ 86 | "topics":"jsontest.source", \ 87 | "request.method":"POST", \ 88 | "headers":"Content-Type:application/vnd.kafka.json.v2+json|Accept:application/vnd.kafka.v2+json", \ 89 | "value.converter":"org.apache.kafka.connect.storage.StringConverter", \ 90 | "batch.prefix":"{\"records\":[", \ 91 | "batch.suffix":"]}", \ 92 | "batch.max.size":"5", \ 93 | "regex.patterns":"^~$", \ 94 | "regex.replacements":"{\"value\":~}", \ 95 | "regex.separator":"~", \ 96 | "name":"http-sink"}, \ 97 | "tasks":[], \ 98 | "type":null \ 99 | } 100 | 101 | .. tip:: Note the regex configurations. REST Proxy expects data to be wrapped in a structure as below: 102 | 103 | .. sourcecode:: bash 104 | 105 | {"records":[{"value":{"foo1":"bar1"}},{"value":{"foo2":"bar2"}}]} 106 | 107 | The regex configurations and batching parameters create this structure around the original messages. 108 | 109 | ------------------- 110 | Confirm the results 111 | ------------------- 112 | 113 | In your earlier opened console consumer you should see the following: 114 | 115 | .. sourcecode:: bash 116 | 117 | {"foo1":"bar1"} 118 | {"foo2":"bar2"} 119 | {"foo3":"bar3"} 120 | {"foo4":"bar4"} 121 | {"foo5":"bar5"} 122 | 123 | .. tip:: In this example we have configured ``batch.max.size`` to 5. This means, if you produce more than 5 messages in 124 | a way in which connect will see them in a signle fetch (e.g. by producing them before starting the connector. 125 | You will see batches of 5 messages submitted as single calls to the HTTP API. 126 | 127 | -------- 128 | Features 129 | -------- 130 | 131 | ----------------------- 132 | Key/Topic substitutions 133 | ----------------------- 134 | 135 | The special strings ``${key}`` and ``${topic}`` can be used in the http.api.url and regex.replacements property to 136 | inject metadata into the destinationAPI. 137 | 138 | ------------------ 139 | Regex Replacements 140 | ------------------ 141 | 142 | The HTTP Sink connector can take a number of regex patterns and replacement strings that are applied the the message 143 | before being submitted to the destination API. For more information see the configuration options ``regex.patterns``, 144 | ``regex.replacements`` and ``regex.separator`` 145 | 146 | -------- 147 | Batching 148 | -------- 149 | 150 | The HTTP Sink connector batches up requests submitted to HTTP APIs for efficiency. Batches can be built with custom 151 | separators, prefixes and suffixes. For more information see the configuration options ``batch.prefix``, ``batch.suffix`` 152 | and ``batch.separator``. 153 | 154 | You can also control when batches are submitted with configuration for maximum size of a batch. For more information 155 | see the configuration option ``batch.max.size`` 156 | 157 | All regex options mentioned above still apply when batching and will be applied to individual messages before being 158 | submitted to the batch. 159 | -------------------------------------------------------------------------------- /licenses.html: -------------------------------------------------------------------------------- 1 | 28 |

kafka-connect-http


29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
ArtifactTypeVersionLicense(s)
kafka-connect-http-5.1.0-SNAPSHOTjar5.1.0-SNAPSHOTApache 2.0
39 | 40 | -------------------------------------------------------------------------------- /logos/http.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/logos/http.jpg -------------------------------------------------------------------------------- /logos/thomaskwscott.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thomaskwscott/kafka-connect-http/7a764616d4feea5865c09b7f9ab7334b481b0a37/logos/thomaskwscott.png -------------------------------------------------------------------------------- /src/assembly/development.xml: -------------------------------------------------------------------------------- 1 | 5 | 7 | development 8 | 9 | dir 10 | 11 | false 12 | 13 | 14 | share/java/kafka-connect-http/ 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/assembly/package.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | package 7 | 8 | dir 9 | 10 | false 11 | 12 | 13 | ${project.basedir} 14 | share/doc/kafka-connect-http/ 15 | 16 | version.txt 17 | README* 18 | LICENSE* 19 | NOTICE* 20 | licenses.html 21 | licenses/ 22 | notices/ 23 | 24 | 25 | 26 | ${project.basedir}/config 27 | etc/kafka-connect-http 28 | 29 | * 30 | 31 | 32 | 33 | 34 | 35 | share/java/kafka-connect-http 36 | true 37 | true 38 | 39 | org.apache.kafka:connect-api 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/assembly/standalone.xml: -------------------------------------------------------------------------------- 1 | 5 | 7 | standalone 8 | 9 | jar 10 | 11 | false 12 | 13 | 14 | ${project.basedir} 15 | / 16 | 17 | README* 18 | LICENSE* 19 | NOTICE* 20 | licenses.html 21 | licenses/ 22 | notices/ 23 | 24 | 25 | 26 | 27 | 28 | / 29 | true 30 | true 31 | runtime 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/uk/co/threefi/connect/http/HttpSinkConnector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Confluent Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.threefi.connect.http; 18 | 19 | import org.apache.kafka.common.config.Config; 20 | import org.apache.kafka.common.config.ConfigDef; 21 | import org.apache.kafka.connect.connector.Task; 22 | import org.apache.kafka.connect.sink.SinkConnector; 23 | import org.slf4j.Logger; 24 | import org.slf4j.LoggerFactory; 25 | 26 | import java.util.ArrayList; 27 | import java.util.List; 28 | import java.util.Map; 29 | 30 | import uk.co.threefi.connect.http.sink.HttpSinkConfig; 31 | import uk.co.threefi.connect.http.sink.HttpSinkTask; 32 | import uk.co.threefi.connect.http.util.Version; 33 | 34 | public final class HttpSinkConnector extends SinkConnector { 35 | private static final Logger log = LoggerFactory.getLogger(HttpSinkConnector.class); 36 | 37 | private Map configProps; 38 | 39 | public Class taskClass() { 40 | return HttpSinkTask.class; 41 | } 42 | 43 | @Override 44 | public List> taskConfigs(int maxTasks) { 45 | log.info("Setting task configurations for {} workers.", maxTasks); 46 | final List> configs = new ArrayList<>(maxTasks); 47 | for (int i = 0; i < maxTasks; ++i) { 48 | configs.add(configProps); 49 | } 50 | return configs; 51 | } 52 | 53 | @Override 54 | public void start(Map props) { 55 | configProps = props; 56 | } 57 | 58 | @Override 59 | public void stop() { 60 | } 61 | 62 | @Override 63 | public ConfigDef config() { 64 | return HttpSinkConfig.CONFIG_DEF; 65 | } 66 | 67 | @Override 68 | public Config validate(Map connectorConfigs) { 69 | // TODO cross-fields validation here: pkFields against the pkMode 70 | return super.validate(connectorConfigs); 71 | } 72 | 73 | @Override 74 | public String version() { 75 | return Version.getVersion(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/uk/co/threefi/connect/http/sink/HttpApiWriter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | package uk.co.threefi.connect.http.sink; 17 | 18 | import org.apache.kafka.connect.sink.SinkRecord; 19 | import org.slf4j.Logger; 20 | import org.slf4j.LoggerFactory; 21 | 22 | import java.io.BufferedReader; 23 | import java.io.IOException; 24 | import java.io.InputStreamReader; 25 | import java.io.OutputStreamWriter; 26 | import java.net.HttpURLConnection; 27 | import java.net.URL; 28 | import java.util.*; 29 | 30 | import javax.ws.rs.core.Response; 31 | 32 | 33 | public class HttpApiWriter { 34 | 35 | private final HttpSinkConfig config; 36 | private static final Logger log = LoggerFactory.getLogger(HttpApiWriter.class); 37 | private Map> batches = new HashMap<>(); 38 | 39 | HttpApiWriter(final HttpSinkConfig config) { 40 | this.config = config; 41 | 42 | } 43 | 44 | public void write(final Collection records) throws IOException { 45 | 46 | for (SinkRecord record : records) { 47 | 48 | // build batch key 49 | String formattedKeyPattern = config.batchKeyPattern 50 | .replace("${key}", record.key() == null ? "" : record.key().toString()) 51 | .replace("${topic}", record.topic()); 52 | 53 | // add to batch and check for batch size limit 54 | if (!batches.containsKey(formattedKeyPattern)) { 55 | batches.put(formattedKeyPattern, new ArrayList (Arrays.asList(new SinkRecord[]{record}))); 56 | } else { 57 | batches.get(formattedKeyPattern).add(record); 58 | } 59 | if (batches.get(formattedKeyPattern).size() >= config.batchMaxSize) { 60 | sendBatch(formattedKeyPattern); 61 | } 62 | } 63 | flushBatches(); 64 | 65 | } 66 | 67 | public void flushBatches() throws IOException { 68 | // send any outstanding batches 69 | for(Map.Entry> entry: batches.entrySet()) { 70 | sendBatch(entry.getKey()); 71 | } 72 | } 73 | 74 | private void sendBatch(String formattedKeyPattern) throws IOException { 75 | 76 | List records = batches.get(formattedKeyPattern); 77 | SinkRecord record0 = records.get(0); 78 | 79 | StringBuilder builder = new StringBuilder(config.batchPrefix); 80 | int batchIndex=0; 81 | for(SinkRecord record : records) { 82 | if (record == null) { 83 | continue; 84 | } 85 | 86 | if (record.value() == null) { 87 | continue; 88 | } 89 | 90 | String recordValue = buildRecord(record); 91 | 92 | builder.append(recordValue); 93 | batchIndex++; 94 | if (batchIndex < records.size()) { 95 | builder.append(config.batchSeparator); 96 | } 97 | } 98 | builder.append(config.batchSuffix); 99 | 100 | // if we dont't have anything to send, skip 101 | if (builder.length() == 0) { 102 | log.debug("nothing to send; skipping the http request"); 103 | return; 104 | } 105 | 106 | // build url - ${key} and ${topic} can be replaced with message values 107 | // the first record in the batch is used to build the url as we assume it will be consistent across all records. 108 | String formattedUrl = config.httpApiUrl 109 | .replace("${key}", record0.key() == null ? "" : record0.key().toString()) 110 | .replace("${topic}", record0.topic()); 111 | HttpSinkConfig.RequestMethod requestMethod = config.requestMethod; 112 | URL url = new URL(formattedUrl); 113 | HttpURLConnection con = (HttpURLConnection) url.openConnection(); 114 | con.setDoOutput(true); 115 | con.setRequestMethod(requestMethod.toString()); 116 | 117 | // add headers 118 | for (String headerKeyValue : config.headers.split(config.headerSeparator)) { 119 | if (headerKeyValue.contains(":")) { 120 | con.setRequestProperty(headerKeyValue.split(":")[0], headerKeyValue.split(":")[1]); 121 | } 122 | } 123 | 124 | OutputStreamWriter writer = new OutputStreamWriter(con.getOutputStream(), "UTF-8"); 125 | writer.write(builder.toString()); 126 | writer.close(); 127 | 128 | //clear batch 129 | batches.remove(formattedKeyPattern); 130 | 131 | log.debug("Submitted payload: " + builder.toString() 132 | + ", url:" + formattedUrl); 133 | 134 | // get response 135 | int status = con.getResponseCode(); 136 | if (Response.Status.Family.familyOf(status) != Response.Status.Family.SUCCESSFUL) { 137 | BufferedReader in = new BufferedReader( 138 | new InputStreamReader(con.getErrorStream())); 139 | String inputLine; 140 | StringBuffer error = new StringBuffer(); 141 | while ((inputLine = in.readLine()) != null) { 142 | error.append(inputLine); 143 | } 144 | in.close(); 145 | throw new IOException("HTTP Response code: " + status 146 | + ", " + con.getResponseMessage() + ", " + error 147 | + ", Submitted payload: " + builder.toString() 148 | + ", url:" + formattedUrl); 149 | } 150 | log.debug(", response code: " + status 151 | + ", " + con.getResponseMessage() 152 | + ", headers: " + config.headers); 153 | 154 | // write the response to the log 155 | BufferedReader in = new BufferedReader( 156 | new InputStreamReader(con.getInputStream())); 157 | String inputLine; 158 | StringBuffer content = new StringBuffer(); 159 | while ((inputLine = in.readLine()) != null) { 160 | content.append(inputLine); 161 | } 162 | in.close(); 163 | con.disconnect(); 164 | } 165 | 166 | private String buildRecord(SinkRecord record) { 167 | // add payload 168 | String value = record.value().toString(); 169 | 170 | // apply regexes 171 | int replacementIndex = 0; 172 | for (String pattern : config.regexPatterns.split(config.regexSeparator)) { 173 | String replacement = ""; 174 | if (replacementIndex < config.regexReplacements.split(config.regexSeparator).length) { 175 | replacement = config.regexReplacements.split(config.regexSeparator)[replacementIndex] 176 | .replace("${key}", record.key() == null ? "" : record.key().toString()) 177 | .replace("${topic}", record.topic()); 178 | } 179 | value = value.replaceAll(pattern, replacement); 180 | replacementIndex++; 181 | } 182 | return value; 183 | } 184 | 185 | } 186 | -------------------------------------------------------------------------------- /src/main/java/uk/co/threefi/connect/http/sink/HttpSinkTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | package uk.co.threefi.connect.http.sink; 17 | 18 | import org.apache.kafka.clients.consumer.OffsetAndMetadata; 19 | import org.apache.kafka.common.TopicPartition; 20 | import org.apache.kafka.connect.errors.ConnectException; 21 | import org.apache.kafka.connect.errors.RetriableException; 22 | import org.apache.kafka.connect.sink.SinkRecord; 23 | import org.apache.kafka.connect.sink.SinkTask; 24 | import org.slf4j.Logger; 25 | import org.slf4j.LoggerFactory; 26 | 27 | import java.io.IOException; 28 | import java.util.Collection; 29 | import java.util.Map; 30 | 31 | public class HttpSinkTask extends SinkTask { 32 | private static final Logger log = LoggerFactory.getLogger(HttpSinkTask.class); 33 | 34 | HttpSinkConfig config; 35 | HttpApiWriter writer; 36 | int remainingRetries; 37 | 38 | @Override 39 | public void start(final Map props) { 40 | log.info("Starting task"); 41 | config = new HttpSinkConfig(props); 42 | initWriter(); 43 | remainingRetries = config.maxRetries; 44 | } 45 | 46 | protected void initWriter() { 47 | writer = new HttpApiWriter(config); 48 | } 49 | 50 | @Override 51 | public void put(Collection records) { 52 | if (records.isEmpty()) { 53 | return; 54 | } 55 | final SinkRecord first = records.iterator().next(); 56 | final int recordsCount = records.size(); 57 | log.trace( 58 | "Received {} records. First record kafka coordinates:({}-{}-{}). Writing them to the " 59 | + "API...", 60 | recordsCount, first.topic(), first.kafkaPartition(), first.kafkaOffset() 61 | ); 62 | try { 63 | writer.write(records); 64 | } catch (Exception e) { 65 | log.warn( 66 | "Write of {} records failed, remainingRetries={}", 67 | records.size(), 68 | remainingRetries, 69 | e 70 | ); 71 | if (remainingRetries == 0) { 72 | throw new ConnectException(e); 73 | } else { 74 | initWriter(); 75 | remainingRetries--; 76 | context.timeout(config.retryBackoffMs); 77 | throw new RetriableException(e); 78 | } 79 | } 80 | remainingRetries = config.maxRetries; 81 | } 82 | 83 | @Override 84 | public void flush(Map map) { 85 | //ignored 86 | } 87 | 88 | public void stop() { 89 | log.info("Stopping task"); 90 | } 91 | 92 | @Override 93 | public String version() { 94 | return getClass().getPackage().getImplementationVersion(); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/main/java/uk/co/threefi/connect/http/util/Version.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | **/ 15 | 16 | package uk.co.threefi.connect.http.util; 17 | 18 | import org.slf4j.Logger; 19 | import org.slf4j.LoggerFactory; 20 | 21 | import java.io.InputStream; 22 | import java.util.Properties; 23 | 24 | public class Version { 25 | private static final Logger log = LoggerFactory.getLogger(Version.class); 26 | private static final String PATH = "/kafka-connect-http-version.properties"; 27 | private static String version = "unknown"; 28 | 29 | static { 30 | try (InputStream stream = Version.class.getResourceAsStream(PATH)) { 31 | Properties props = new Properties(); 32 | props.load(stream); 33 | version = props.getProperty("version", version).trim(); 34 | } catch (Exception e) { 35 | log.warn("Error while loading version:", e); 36 | } 37 | } 38 | 39 | public static String getVersion() { 40 | return version; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/resources/kafka-connect-http-version.properties: -------------------------------------------------------------------------------- 1 | ## 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | ## 15 | 16 | version=${project.version} -------------------------------------------------------------------------------- /src/test/java/uk/co/threefi/connect/http/HttpSinkConnectorTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | **/ 15 | 16 | package uk.co.threefi.connect.http; 17 | 18 | public class HttpSinkConnectorTest { 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/test/java/uk/co/threefi/connect/http/sink/HttpSinkTaskTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"); 4 | * you may not use this file except in compliance with the License. 5 | * You may obtain a copy of the License at 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | * 9 | * Unless required by applicable law or agreed to in writing, software 10 | * distributed under the License is distributed on an "AS IS" BASIS, 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | * See the License for the specific language governing permissions and 13 | * limitations under the License. 14 | */ 15 | 16 | package uk.co.threefi.connect.http.sink; 17 | 18 | import org.apache.kafka.connect.errors.ConnectException; 19 | import org.apache.kafka.connect.errors.RetriableException; 20 | import org.apache.kafka.connect.sink.SinkRecord; 21 | import org.apache.kafka.connect.sink.SinkTaskContext; 22 | import org.easymock.EasyMockSupport; 23 | import org.junit.Test; 24 | 25 | import java.io.IOException; 26 | import java.util.Collections; 27 | import java.util.HashMap; 28 | import java.util.Map; 29 | import java.util.Set; 30 | 31 | import static org.easymock.EasyMock.expectLastCall; 32 | import static org.junit.Assert.assertEquals; 33 | import static org.junit.Assert.fail; 34 | 35 | public class HttpSinkTaskTest extends EasyMockSupport { 36 | 37 | @Test 38 | public void retries() throws IOException { 39 | final int maxRetries = 2; 40 | final int retryBackoffMs = 1000; 41 | 42 | Set records = Collections.singleton(new SinkRecord("stub", 0, null, null, null, "someVal", 0)); 43 | final HttpApiWriter mockWriter = createMock(HttpApiWriter.class); 44 | SinkTaskContext ctx = createMock(SinkTaskContext.class); 45 | 46 | mockWriter.write(records); 47 | expectLastCall().andThrow(new IOException()).times(1 + maxRetries); 48 | 49 | ctx.timeout(retryBackoffMs); 50 | expectLastCall().times(maxRetries); 51 | 52 | HttpSinkTask task = new HttpSinkTask() { 53 | @Override 54 | protected void initWriter() { 55 | this.writer = mockWriter; 56 | } 57 | }; 58 | task.initialize(ctx); 59 | 60 | Map props = new HashMap<>(); 61 | props.put(HttpSinkConfig.HTTP_API_URL, "stub"); 62 | props.put(HttpSinkConfig.MAX_RETRIES, String.valueOf(maxRetries)); 63 | props.put(HttpSinkConfig.RETRY_BACKOFF_MS, String.valueOf(retryBackoffMs)); 64 | task.start(props); 65 | 66 | replayAll(); 67 | 68 | try { 69 | task.put(records); 70 | fail(); 71 | } catch (RetriableException expected) { 72 | } 73 | 74 | try { 75 | task.put(records); 76 | fail(); 77 | } catch (RetriableException expected) { 78 | } 79 | 80 | try { 81 | task.put(records); 82 | fail(); 83 | } catch (RetriableException e) { 84 | fail("Non-retriable exception expected"); 85 | } catch (ConnectException expected) { 86 | assertEquals(IOException.class, expected.getCause().getClass()); 87 | } 88 | 89 | verifyAll(); 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/test/java/uk/co/threefi/connect/http/sink/RequestInfo.java: -------------------------------------------------------------------------------- 1 | package uk.co.threefi.connect.http.sink; 2 | 3 | import java.util.List; 4 | 5 | public class RequestInfo { 6 | 7 | private String body; 8 | private String method; 9 | private String url; 10 | private long timeStamp; 11 | private List headers; 12 | 13 | public String getBody() { 14 | return body; 15 | } 16 | 17 | public void setBody(String body) { 18 | this.body = body; 19 | } 20 | 21 | public String getMethod() { 22 | return method; 23 | } 24 | 25 | public void setMethod(String method) { 26 | this.method = method; 27 | } 28 | 29 | public String getUrl() { 30 | return url; 31 | } 32 | 33 | public void setUrl(String url) { 34 | this.url = url; 35 | } 36 | 37 | public List getHeaders() { 38 | return headers; 39 | } 40 | 41 | public void setHeaders(List headers) { 42 | this.headers = headers; 43 | } 44 | 45 | public long getTimeStamp() { 46 | return timeStamp; 47 | } 48 | 49 | public void setTimeStamp(long timeStamp) { 50 | this.timeStamp = timeStamp; 51 | } 52 | 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/test/java/uk/co/threefi/connect/http/sink/RestHelper.java: -------------------------------------------------------------------------------- 1 | package uk.co.threefi.connect.http.sink; 2 | 3 | 4 | import org.eclipse.jetty.server.Connector; 5 | import org.eclipse.jetty.server.Server; 6 | import org.eclipse.jetty.server.ServerConnector; 7 | import org.eclipse.jetty.servlet.ServletContextHandler; 8 | import org.eclipse.jetty.servlet.ServletHolder; 9 | 10 | import javax.servlet.ServletException; 11 | import javax.servlet.http.HttpServlet; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.io.BufferedReader; 15 | import java.io.IOException; 16 | import java.util.ArrayList; 17 | import java.util.Enumeration; 18 | import java.util.List; 19 | 20 | public class RestHelper extends HttpServlet { 21 | 22 | private Server server; 23 | private static int port; 24 | private static List capturedRequests = new ArrayList(); 25 | 26 | public void start() throws Exception { 27 | //flushCapturedRequests(); 28 | server = new Server(0); 29 | ServerConnector connector = new ServerConnector(server); 30 | ServletContextHandler handler = new ServletContextHandler(); 31 | ServletHolder testServ = new ServletHolder("test", RestHelper.class); 32 | testServ.setInitParameter("resourceBase",System.getProperty("user.dir")); 33 | testServ.setInitParameter("dirAllowed","true"); 34 | handler.addServlet(testServ,"/test"); 35 | handler.addServlet(testServ,"/someTopic"); 36 | handler.addServlet(testServ,"/someKey"); 37 | 38 | 39 | 40 | server.setHandler(handler); 41 | server.setConnectors(new Connector[]{connector}); 42 | 43 | server.start(); 44 | 45 | port = server.getURI().getPort(); 46 | 47 | } 48 | 49 | public void stop() throws Exception { 50 | server.stop(); 51 | } 52 | 53 | public int getPort() { 54 | return port; 55 | } 56 | 57 | protected void doGet( 58 | HttpServletRequest request, 59 | HttpServletResponse response) 60 | throws ServletException, IOException { 61 | 62 | capturedRequests.add(getRequestInfo(request)); 63 | 64 | response.setContentType("application/json"); 65 | response.setStatus(HttpServletResponse.SC_OK); 66 | response.getWriter().println("{ \"status\": \"ok\"}"); 67 | } 68 | 69 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 70 | 71 | capturedRequests.add(getRequestInfo(request)); 72 | 73 | response.setContentType("application/json"); 74 | response.setStatus(HttpServletResponse.SC_OK); 75 | response.getWriter().println("{ \"status\": \"ok\"}"); 76 | } 77 | 78 | protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 79 | 80 | capturedRequests.add(getRequestInfo(request)); 81 | 82 | response.setContentType("application/json"); 83 | response.setStatus(HttpServletResponse.SC_OK); 84 | response.getWriter().println("{ \"status\": \"ok\"}"); 85 | } 86 | 87 | protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 88 | 89 | capturedRequests.add(getRequestInfo(request)); 90 | 91 | response.setContentType("application/json"); 92 | response.setStatus(HttpServletResponse.SC_OK); 93 | response.getWriter().println("{ \"status\": \"ok\"}"); 94 | } 95 | 96 | private RequestInfo getRequestInfo(HttpServletRequest request) throws IOException { 97 | RequestInfo requestInfo = new RequestInfo(); 98 | 99 | 100 | // Read from request 101 | StringBuilder buffer = new StringBuilder(); 102 | BufferedReader reader = request.getReader(); 103 | String line; 104 | while ((line = reader.readLine()) != null) { 105 | buffer.append(line); 106 | } 107 | reader.close(); 108 | requestInfo.setBody(buffer.toString()); 109 | requestInfo.setUrl(request.getRequestURI()); 110 | requestInfo.setMethod(request.getMethod()); 111 | requestInfo.setTimeStamp(System.currentTimeMillis()); 112 | Enumeration headerNames = request.getHeaderNames(); 113 | List headers = new ArrayList<>(); 114 | while (headerNames.hasMoreElements()) { 115 | String headerName = headerNames.nextElement(); 116 | Enumeration requestHeaders = request.getHeaders(headerName); 117 | while (requestHeaders.hasMoreElements()) { 118 | String headerValue = requestHeaders.nextElement(); 119 | headers.add(headerName + ":" + headerValue); 120 | } 121 | } 122 | requestInfo.setHeaders(headers); 123 | return requestInfo; 124 | } 125 | 126 | public List getCapturedRequests() { 127 | return capturedRequests; 128 | } 129 | 130 | public void flushCapturedRequests() { 131 | capturedRequests.clear(); 132 | } 133 | 134 | 135 | 136 | } 137 | -------------------------------------------------------------------------------- /src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | ## 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | ## 15 | 16 | log4j.rootLogger=INFO, stdout 17 | 18 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 19 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 20 | log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n 21 | 22 | log4j.logger.org.apache.kafka=ERROR 23 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | ##This file must be updated at package time to have a valid package## 2 | invalid 3 | --------------------------------------------------------------------------------