我正在使用批处理模式从运动流中提取记录。我们正在使用弹簧aws运动粘合剂。
大多数情况下,我们无法从流中提取消息。只有一些时候,我们能够从流中提取消息。
我的配置如下
我的配置
spring:
cloud:
stream:
kinesis:
binder:
locks:
leaseDuration: 30
readCapacity: 1
writeCapacity: 1
checkpoint:
readCapacity: 1
writeCapacity: 1
bindings:
InStreamGroupOne:
consumer:
listenerMode: batch
idleBetweenPolls: 30000
recordsLimit: 5000
consumer-backoff: 1000
bindings:
InStreamGroupOne:
group: in-stream-group
destination: stream-1
content-type: application/json
OutboundStreamOne:
destination: stream-2
content-type: application/json
OutboundStreamTwo:
destination: stream-3
content-type: application/json
OutboundStreamThree:
destination: stream-4
content-type: application/json当我启用调试日志记录时,我可以看到这个异常。
Received error response: com.amazonaws.services.dynamodbv2.model.ProvisionedThroughputExceededException: The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API. (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ProvisionedThroughputExceededException; 我试着将批处理大小减少到150和idleBetweenPools到1秒。我还将readCapacity和writeCapacity更新为10,但也有相同的错误。
从AWS控制台,我可以看到SpringIntegrationLockRegistry已经跨过了读取阈值。
你能帮我们了解一下到底出了什么问题吗。
它有时起作用,有时不起作用。
发布于 2019-04-09 14:58:06
下面是关于AWS上的DynamoDB:How to solve throughput error for dynamodb?可以做的事情
从应用程序的角度来看,您可以使用锁的选项:https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis/blob/master/spring-cloud-stream-binder-kinesis-docs/src/main/asciidoc/overview.adoc#lockregistry
leaseDuration批给该锁的租约的时间长度。例如,如果设置为30秒,那么如果心跳至少30秒没有发送,锁就会过期(例如,如果盒或心跳线程死掉,就会发生这种情况)。 违约: 20heartbeatPeriod更新DynamoDB以注意实例仍在运行的频率(建议使其至少比leaseDuration小3倍--例如,heartBeatPeriod=1秒,leaseDuration=10秒可以是一个合理的配置,确保包含一个网络延迟缓冲区)。 违约:5refreshPeriod要等待多长时间才能再次获得锁(例如,如果设置为10秒,它将尝试每10秒进行一次) 缺省值: 1000
https://stackoverflow.com/questions/55594545
复制相似问题