- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 Kafka 0.10.0.1 集群中有一个有 10 个分区的主题。我有一个产生多个消费者线程的应用程序。对于这个主题,我生成了 5 个线程。在我的应用程序日志中,我多次看到此条目
INFO :: AbstractCoordinator:600 - Marking the coordinator x.x.x.x:9092
(id:2147483646 rack: null) dead for group notifications-consumer
(Re-)joining group notifications-consumer.
之后我还看到一个警告说
Auto commit failed for group notifications-consumer: Commit cannot be completed since
the group has already rebalanced and assigned the partitions to another member. This means
that the time between subsequent calls to poll() was longer than the configured
max.poll.interval.ms, which typically implies that the poll loop is spending too much time
message processing. You can address this either by increasing the session timeout
or by reducing the maximum size of batches returned by poll() with max.poll.records.
props.put("max.poll.records", 200);
props.put("heartbeat.interval.ms", 20000);
props.put("session.timeout.ms", 60000);
最佳答案
与 session.timeout.ms
您只控制由于心跳导致的超时,这意味着已通过 session.timeout.ms
自上次心跳以来的毫秒数,集群将您声明为死节点并触发重新平衡。
之前 KIP-62心跳是在轮询中发送的,但现在被移动到特定的后台线程,以避免在您花费的时间超过 session.timeout.ms
时被从集群中逐出。调用另一个 poll()
.
将心跳分离到特定线程可以将处理与告诉集群您已启动并正在运行分离,但这引入了“活锁”情况的风险,其中进程处于事件状态但没有取得进展,因此除了使心跳独立的poll
引入了新的超时,以确保消费者还活着并取得进展。
文档说明了 KIP-62 之前的实现:
As long as the consumer is sending heartbeats, it basically holds a lock on the partitions it was assigned. If the process becomes defunct in such a way that it cannot make progress but is nevertheless continuing to send heartbeats, then no other member in the group will be able to take over the partitions, which causes increasing lag. The fact that heartbeating and processing is all done in the same thread, however, guarantees that consumers must make progress to keep their assignment. Any stall which affects processing also affects heartbeats.
Decoupling the processing timeout: We propose to introduce a separate locally enforced timeout for record processing and a background thread to keep the session active until this timeout expires. We call this new timeout as the "process timeout" and expose it in the consumer's configuration as max.poll.interval.ms. This config sets the maximum delay between client calls to poll()
max.poll.interval.ms
(默认为 5 分钟)处理 200 条轮询记录。
max.poll.records
或增加
max.poll.interval.ms
.
max.poll.interval.ms
出现在您的日志中的配置来自(至少)kafka 0.10.1.0,所以我认为您在那里犯了一个小错误。
org.apache.kafka.clients.consumer.KafkaConsumer
,如果您使用的是 Java)并将它们订阅到 N 个不同的主题,但使用相同的
group.id
.
KafkaConsumer
启动或停止,因为它会发送
JoinGroup
或
LeaveGroup
包含
group.id
的消息(参见相应的
kafka protocol )和
member.id
(
member.id
不是主机,因此在同一进程中创建的两个使用者仍将具有不同的 ID)。请注意,这些消息不包含主题订阅信息(尽管该信息应该在代理中,但 kafka 不会将其用于重新平衡)。
JoinGroup
或
LeaveGroup
为
group.id
X,它将为所有具有相同
group.id
的消费者触发重新平衡。 X。
group.id
启动 25 个消费者您将看到重新平衡,直到创建最后一个消费者并且相应的重新平衡结束(如果您继续看到这一点,您可能会停止消费者)。
If we have two KafkaConsumer using the same group.id (running in the same process or in two different processes) and one of them is closed, it triggers a rebalance in the other KafkaConsumer even if they were subscribed to different topics. I suppose that brokers must be taking into account only the group.id for a rebalance and not the subscribed topics corresponding to the pair (group_id,member_id) of the LeaveGroupRequest but I'm wondering if this is the expected behavior or it's something that should be improved? I guess that is probably the first option to avoid a more complex rebalance in the broker and considering that the solution is very simple, i.e. just use different group ids for different KafkaConsumer that subscribe to different topics even if they are running in the same process.
When rebalance occurs we see duplicate messages coming
I segregated into two groups, now suddenly problem has disappeared since past 2 hours.
group.id
对于每个主题。
关于apache-kafka - 卡夫卡消费者错误 : Marking coordinator dead,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50351464/
在我的项目中,我使用 LocationSearchTable/MKLocalSearch。当用户点击一个项目时,我的添加注释方法在 MapViewController 中被调用: func dropP
我很想知道如何检查字符串是否具有两个坐标的格式,例如: (signed int x,signed int y) 我已经通过搜索找到了一些答案,但我还没有完全理解它们(刚开始使用 C++),我要求一个简
在我正在编写的程序中,我为两个类(坐标和图形)编写了代码,其中一个将另一个作为构造函数参数。当我尝试编译它时,出现以下 Graph.cpp 错误: undefined symbol : “Graph:
我在 OpenGL ES 中绘制变化的条,它有坐标 (x,y,z)。 我想在 Action_Down 上添加一些更改(例如:栏中的颜色)。有 getX(),但此方法返回以像素为单位的 x 坐标,而不是
因为我之前的问题很不清楚,所以我编辑了一下: 我有以下问题: 我想为半径为 r+fcr_size 的空心球体构建一个图案。空心球体的空腔半径应为 r。有了这个图案,我可以在许多不同的球体中心使用它,并
我想使用 Vuforia 检测标记并在其上放置一个 3d 对象。从那时起,我想在我的应用程序中使用 ARKit。我如何知道检测到的标记或 3d 对象的 ARKit 世界变换? 我正在使用相同的 Vie
我有一组纬度/经度坐标,我可以使用它们进行投影,例如 Mollweide 投影。 library(mapproj) set.seed(0) n 180] = my.points$x[my.point
我正在使用 JavaScript 进行视频处理,我做得很好,但我使用的是一种名为 canvasCtx.rect () 的方法,它接收这些参数。 然后我可以从使用 getImageData () 方法绘
我创建了一个新项目作为单 View 应用程序。在 View Controller 中添加了用于将 View 坐标转换为窗口坐标的代码: - (void) dumpFrame { CGRect
简短版本:如何将 SVG 路径添加到 Leaflet map ,以便在 map 坐标更改时(例如缩放更改或滑动时)路径会更新? 长版:你好,我有一个地形image包含建筑轮廓。对图像进行地理校正后,我
我编写了一个代码,使用 astropy 将坐标从地球固定系统转换为惯性坐标系: from astropy import coordinates as coord from astropy import
我的多显示器设置中遇到以下情况: 在此示例中,我希望将窗口精确定位在黄色箭头所示的坐标处。然而,我所拥有的只是 NSView 的坐标,它是跨越整个(更大、更上面)辅助监视器的 NSWindow 的 c
我不知道如何将 Pane 上圆形对象的所有 x 和 y 与鼠标的 x 和 y 进行比较。我正在处理的问题要求我设置它,以便鼠标的二次单击会在放置在其上时删除一个点,我想我可以通过比较圆坐标和鼠标坐标的
我正在尝试将图像中的几个点转换为 OpenCV 中的极坐标。我遇到了名为 cartToPolar 的函数,它会为我的点提供相对于 0,0 作为我的原点的极坐标。但是,我想通过将图像中的另一个点作为原点
是的,我想知道如何检查某个坐标是否在另一个坐标半径内。但这可能是一个很小的差异,因为纬度、经度、半径存储在数据库中,而我们要检查的只是给定的坐标。 示例 数据库表 name | lat
我正在使用带有图层的 map (来自示例): var lonLat = new OpenLayers.LonLat(40.4088576, -86.8576718) .
我在坐标转换方面遇到了一些麻烦。 我在屏幕上有一个已知坐标(x,y)的对象,我想将其转换为世界坐标(x,y,z),因为它会投影在相机的近平面上。 到目前为止,我可以像这样在Z平面上进行投影: var
我有4个足球场点(角点): P1(lat, lon, alt) , P2(lat, lon, alt) , P3(lat, lon, alt) , P4(lat, lon, alt) . 以及球场上的
我有一个交换了纬度和经度位置的 NetCDF 文件。 我通常使用的 Netcdf 的标准方式定义如下: Coordinates: * time (time) datetime64[n
如果 line1 和 lin2 都由 x,y,alpha 定义,其中 x,y 是直线上一点的坐标,alpha 是直线与 x=const 之间的角度,如何找到 line1 和 lin2 相交的点? 我尝
我是一名优秀的程序员,十分优秀!