bin/pulsar-admin namespaces | grep expiration get-subscription-expiration-time Get subscription expiration time for Usage: get-subscription-expiration-time [options] tenant/namespace set-subscription-expiration-time Set subscription expiration time for Usage: set-subscription-expiration-time [options] tenant/namespace Subscription expiration time in minutes remove-subscription-expiration-time Remove subscription expiration Usage: remove-subscription-expiration-time [options] tenant/namespace
sequenceDiagram
participant C as Client
participant B as Broker
loop
C ->> B: expire-messages-all-subscriptions Request
B -->> C: expire-messages-all-subscriptions Response
end
自定义代码实现Backlog大小策略
sequenceDiagram
participant C as Client
participant B as Broker
loop
C ->> B: stats-internal Request
B -->> C: stats-internal Response
alt messageBacklogSize < maxMessageBacklogSize
else messageBacklogSize >= maxMessageBacklogSize
Note over B,C: estimate the backlog position
C ->> B: get-message-by-id Request
B -->> C: get-message-by-id
Note over B,C: get the timestamp of the message
C ->> B: expire-messages-all-subscriptions Request
B -->> C: expire-messages-all-subscriptions Response
end
end
// 1) Use nodeIP if set (and not "0.0.0.0"/"::") // 2) If the user has specified an IP to HostnameOverride, use it // 3) Lookup the IP from node name by DNS // 4) Try to get the IP from the network interface used as default gateway // // For steps 3 and 4, IPv4 addresses are preferred to IPv6 addresses // unless nodeIP is "::", in which case it is reversed.
modprobe nlmon ip link add nlmon0 type nlmon ip linkset dev nlmon0 up tcpdump -i nlmon0 -w netlinik.pcap # 使用nlmon 驱动模块,这个nlmon 驱动模块会注册一个 netlink tap 口,用户态向内核发送 netlink 消息、内核向用户态发送 netlink 消息,报文都会经过这个 tap 口。
Rule 9: Use longest matching prefix. When DA and DB belong to the same address family (both are IPv6 or both are IPv4): If CommonPrefixLen(DA, Source(DA)) > CommonPrefixLen(DB, Source(DB)), then prefer DA. Similarly, if CommonPrefixLen(DA, Source(DA)) < CommonPrefixLen(DB, Source(DB)), then prefer DB.