@@ -58,7 +58,7 @@ function Consumer:_poll_msg()
58
58
end
59
59
fiber .yield ()
60
60
else
61
- -- throtling poll
61
+ -- throttling poll
62
62
fiber .sleep (0.01 )
63
63
end
64
64
end
@@ -72,12 +72,12 @@ function Consumer:_poll_logs()
72
72
count , err = self ._consumer :poll_logs (100 )
73
73
if err ~= nil then
74
74
log .error (" Consumer poll logs error: %s" , err )
75
- -- throtling poll
75
+ -- throttling poll
76
76
fiber .sleep (0.1 )
77
77
elseif count > 0 then
78
78
fiber .yield ()
79
79
else
80
- -- throtling poll
80
+ -- throttling poll
81
81
fiber .sleep (1 )
82
82
end
83
83
end
@@ -91,12 +91,12 @@ function Consumer:_poll_errors()
91
91
count , err = self ._consumer :poll_errors (100 )
92
92
if err ~= nil then
93
93
log .error (" Consumer poll errors error: %s" , err )
94
- -- throtling poll
94
+ -- throttling poll
95
95
fiber .sleep (0.1 )
96
96
elseif count > 0 then
97
97
fiber .yield ()
98
98
else
99
- -- throtling poll
99
+ -- throttling poll
100
100
fiber .sleep (1 )
101
101
end
102
102
end
@@ -110,12 +110,12 @@ function Consumer:_poll_rebalances()
110
110
count , err = self ._consumer :poll_rebalances (1 )
111
111
if err ~= nil then
112
112
log .error (" Consumer poll rebalances error: %s" , err )
113
- -- throtling poll
113
+ -- throttling poll
114
114
fiber .sleep (0.1 )
115
115
elseif count > 0 then
116
116
fiber .yield ()
117
117
else
118
- -- throtling poll
118
+ -- throttling poll
119
119
fiber .sleep (0.5 )
120
120
end
121
121
end
@@ -210,19 +210,18 @@ function Producer.create(config)
210
210
end
211
211
212
212
function Producer :_msg_delivery_poll ()
213
- local count , err
214
213
while true do
215
214
local count , err
216
215
while true do
217
216
count , err = self ._producer :msg_delivery_poll (100 )
218
217
if err ~= nil then
219
218
log .error (err )
220
- -- throtling poll
219
+ -- throttling poll
221
220
fiber .sleep (0.01 )
222
221
elseif count > 0 then
223
222
fiber .yield ()
224
223
else
225
- -- throtling poll
224
+ -- throttling poll
226
225
fiber .sleep (0.01 )
227
226
end
228
227
end
@@ -237,12 +236,12 @@ function Producer:_poll_logs()
237
236
count , err = self ._producer :poll_logs (100 )
238
237
if err ~= nil then
239
238
log .error (" Producer poll logs error: %s" , err )
240
- -- throtling poll
239
+ -- throttling poll
241
240
fiber .sleep (0.1 )
242
241
elseif count > 0 then
243
242
fiber .yield ()
244
243
else
245
- -- throtling poll
244
+ -- throttling poll
246
245
fiber .sleep (1 )
247
246
end
248
247
end
@@ -256,12 +255,12 @@ function Producer:_poll_errors()
256
255
count , err = self ._producer :poll_errors (100 )
257
256
if err ~= nil then
258
257
log .error (" Producer poll errors error: %s" , err )
259
- -- throtling poll
258
+ -- throttling poll
260
259
fiber .sleep (0.1 )
261
260
elseif count > 0 then
262
261
fiber .yield ()
263
262
else
264
- -- throtling poll
263
+ -- throttling poll
265
264
fiber .sleep (1 )
266
265
end
267
266
end
0 commit comments