rocketmq

RocketMQ

Remoting

命令包含了一些基本信息:

命令可以被序列化:


优先选用 sun.nio.ch.EPollSelectorProvider:

Client

  • 每隔 30 秒 updateTopicRouteInfoFromNameServer
  • 每隔 5 秒,持久化:
1
2
private final ConcurrentMap<String, MQConsumerInner> consumerTable =
new ConcurrentHashMap<String, MQConsumerInner>();

每一个 MQConsumerInner 包含一个:

1
2
protected final ConcurrentMap<MessageQueue, ProcessQueue> processQueueTable =
new ConcurrentHashMap<MessageQueue, ProcessQueue>(64);

如何 Benchmark 延迟

  • Note timestamp before request,t0.
  • Make 同步 request.
  • Note timestamp after request, t1.
  • Record latency t1 – t0.
  • Repeat as needed for request schedule.

推荐文章