Foreword |
|
xv | |
Preface |
|
xvi | |
Acknowledgments |
|
xviii | |
About This Book |
|
xx | |
About The Authors |
|
xxiii | |
About The Cover Illustration |
|
xxiv | |
Part 1 Getting Started |
|
|
|
3 | (14) |
|
|
4 | (4) |
|
|
8 | (2) |
|
|
8 | (1) |
|
Explaining Kafka to your manager |
|
|
9 | (1) |
|
|
10 | (1) |
|
Kafka only works with Hadoop® |
|
|
10 | (1) |
|
Kafka is the same as other message brokers |
|
|
11 | (1) |
|
1.4 Kafka in the real world |
|
|
11 | (4) |
|
|
12 | (1) |
|
|
13 | (1) |
|
When Kafka might not be the right fit |
|
|
14 | (1) |
|
1.5 Online resources to get started |
|
|
15 | (1) |
|
|
15 | (2) |
|
|
17 | (24) |
|
2.1 Producing and consuming a message |
|
|
18 | (1) |
|
|
18 | (5) |
|
|
23 | (7) |
|
|
23 | (3) |
|
|
26 | (1) |
|
|
27 | (1) |
|
Kafka's high-level architecture |
|
|
28 | (1) |
|
|
29 | (1) |
|
2.4 Various source code packages and what they do |
|
|
30 | (3) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
33 | (3) |
|
2.6 Stream processing and terminology |
|
|
36 | (3) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (2) |
Part 2 Applying Kafka |
|
41 | (138) |
|
3 Designing a Kafka project |
|
|
43 | (23) |
|
3.1 Designing a Kafka project |
|
|
44 | (5) |
|
Taking over an existing data architecture |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
44 | (3) |
|
|
47 | (2) |
|
|
49 | (8) |
|
|
49 | (2) |
|
Why Kafka is the right fit |
|
|
51 | (1) |
|
Thought starters on our design |
|
|
52 | (1) |
|
|
53 | (1) |
|
High-level plan for applying our questions |
|
|
54 | (3) |
|
|
57 | (1) |
|
|
57 | (7) |
|
|
58 | (1) |
|
|
59 | (5) |
|
|
64 | (2) |
|
4 Producers: Sourcing data |
|
|
66 | (21) |
|
|
67 | (3) |
|
|
70 | (1) |
|
|
70 | (6) |
|
Configuring the broker list |
|
|
71 | (1) |
|
How to go fast (or go safer) |
|
|
72 | (2) |
|
|
74 | (2) |
|
4.3 Generating code for our requirements |
|
|
76 | (9) |
|
Client and broker versions |
|
|
84 | (1) |
|
|
85 | (2) |
|
5 Consumers: Unlocking data |
|
|
87 | (24) |
|
|
88 | (8) |
|
|
89 | (3) |
|
Understanding our coordinates |
|
|
92 | (4) |
|
5.2 How consumers interact |
|
|
96 | (1) |
|
|
96 | (5) |
|
|
98 | (2) |
|
Partition assignment strategy |
|
|
100 | (1) |
|
|
101 | (2) |
|
5.5 Reading from a compacted topic |
|
|
103 | (1) |
|
5.6 Retrieving code for our factory requirements |
|
|
103 | (5) |
|
|
103 | (2) |
|
|
105 | (3) |
|
|
108 | (3) |
|
|
111 | (18) |
|
6.1 Introducing the broker |
|
|
111 | (1) |
|
|
112 | (1) |
|
6.3 Options at the broker level |
|
|
113 | (4) |
|
Kafka's other logs: Application logs |
|
|
115 | (1) |
|
|
115 | (1) |
|
|
116 | (1) |
|
6.4 Partition replica leaders and their role |
|
|
117 | (3) |
|
|
119 | (1) |
|
|
120 | (3) |
|
|
121 | (1) |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
6.6 A note on stateful systems |
|
|
123 | (2) |
|
|
125 | (1) |
|
|
126 | (3) |
|
|
129 | (15) |
|
|
129 | (5) |
|
|
132 | (2) |
|
|
134 | (1) |
|
|
134 | (3) |
|
|
135 | (1) |
|
|
136 | (1) |
|
7.3 Testing with EmbeddedKafkaCluster |
|
|
137 | (2) |
|
Using Kafka Testcontainers |
|
|
138 | (1) |
|
|
139 | (3) |
|
|
142 | (2) |
|
|
144 | (14) |
|
8.1 How long to store data |
|
|
145 | (1) |
|
|
146 | (1) |
|
Keeping the original event |
|
|
146 | (1) |
|
Moving away from a batch mindset |
|
|
146 | (1) |
|
|
147 | (4) |
|
|
147 | (2) |
|
|
149 | (1) |
|
|
149 | (1) |
|
Example use case for data storage |
|
|
150 | (1) |
|
8.4 Bringing data back into Kafka |
|
|
151 | (1) |
|
|
152 | (1) |
|
8.5 Architectures with Kafka |
|
|
152 | (3) |
|
|
153 | (1) |
|
|
154 | (1) |
|
8.6 Multiple cluster setups |
|
|
155 | (1) |
|
Scaling by adding clusters |
|
|
155 | (1) |
|
8.7 Cloud- and container-based storage options |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
156 | (2) |
|
9 Management: Tools and logging |
|
|
158 | (21) |
|
9.1 Administration clients |
|
|
159 | (4) |
|
Administration in code with AdminClient |
|
|
159 | (2) |
|
|
161 | (1) |
|
|
162 | (1) |
|
9.2 Running Kafka as a systemd service |
|
|
163 | (1) |
|
|
164 | (2) |
|
|
164 | (2) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
167 | (3) |
|
|
167 | (3) |
|
|
170 | (4) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
9.7 General monitoring tools |
|
|
174 | (2) |
|
|
176 | (3) |
Part 3 Going Further |
|
179 | (48) |
|
|
181 | (16) |
|
|
183 | (4) |
|
|
183 | (1) |
|
SSL between brokers and clients |
|
|
184 | (3) |
|
|
187 | (1) |
|
10.2 Kerberos and the Simple Authentication and Security Layer (SASL) |
|
|
187 | (2) |
|
10.3 Authorization in Kafka |
|
|
189 | (2) |
|
Access control lists (ACLs) |
|
|
189 | (1) |
|
Role-based access control (RBAC) |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
191 | (1) |
|
|
191 | (3) |
|
|
192 | (1) |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
195 | (2) |
|
|
197 | (12) |
|
11.1 A proposed Kafka maturity model |
|
|
198 | (2) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (2) |
|
Installing the Confluent Schema Registry |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
202 | (3) |
|
|
202 | (1) |
|
|
203 | (2) |
|
|
205 | (2) |
|
Validating schema modifications |
|
|
205 | (2) |
|
11.5 Alternative to a schema registry |
|
|
207 | (1) |
|
|
208 | (1) |
|
12 Stream processing with Kafka Streams and ksqlDB |
|
|
209 | (18) |
|
|
210 | (9) |
|
|
211 | (4) |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
216 | (2) |
|
|
218 | (1) |
|
12.2 ksq1DB: An event-streaming database |
|
|
219 | (4) |
|
|
220 | (1) |
|
|
220 | (2) |
|
|
222 | (1) |
|
|
223 | (1) |
|
Kafka Improvement Proposals (KIPS) |
|
|
223 | (1) |
|
Kafka projects you can explore |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
224 | (3) |
Appendix A Installation |
|
227 | (7) |
Appendix B Client example |
|
234 | (5) |
Index |
|
239 | |