【发布时间】:2020-05-29 16:49:45
【问题描述】:
我是 Vert.x 的新手。当我从https://vertx.io/docs/vertx-core/java/阅读文章中的writestream时如下:
setWriteQueueMaxSize: set the number of object at which the write queue is
considered full, and the method writeQueueFull returns true. Note that,
when the write queue is considered full, if write is called the data will
still be accepted and queued. The actual number depends on the stream
implementation, for Buffer the size represents the actual number of bytes
written and not the number of buffers.
尤其是这句话——“请注意,当写入队列被认为已满时,如果调用写入数据仍将被接受并排队。”,从这句话中,我有几个问题:
(1) 写入流有大小限制吗?我的意思是,例如事件总线,可以向事件总线写入多少消息?它取决于内存吗?假设我继续将消息写入事件总线并且消息没有被消耗,这是否会导致 Java 中的内存不足?
(2) 如果写入有一些限制,我在哪里以及如何检查默认队列大小?比如想知道Vert.x KafkaProducer的默认队列大小,在哪里可以查看?
感谢任何想法。
【问题讨论】:
标签: vert.x