Nchan 实时消息内置变量

 
以下参考官方文档:
 
  • $nchan_channel_id
    The channel id extracted from a publisher or subscriber location request. For multiplexed locations, this is the first channel id in the list.

  • $nchan_channel_id1, $nchan_channel_id2, $nchan_channel_id3, $nchan_channel_id4
    As above, but for the nth channel id in multiplexed channels.

  • $nchan_subscriber_type
    For subscriber locations, this variable is set to the subscriber type (websocket, longpoll, etc.).

  • $nchan_publisher_type
    For publisher locations, this variable is set to the subscriber type (http or websocket).

  • $nchan_prev_message_id, $nchan_message_id The current and previous (if applicable) message id for publisher request or subscriber response.

  • $nchan_channel_event For channel events, this is the event name. Useful when configuring nchan_channel_event_string.

  • $nchan_version Current Nchan version. Available since 1.1.5.

Additionally, nchan_stub_status data is also exposed as variables. These are available only when nchan_stub_status is enabled on at least one location:

    • $nchan_stub_status_total_published_messages
    • $nchan_stub_status_stored_messages
    • $nchan_stub_status_shared_memory_used
    • $nchan_stub_status_channels
    • $nchan_stub_status_subscribers
    • $nchan_stub_status_redis_pending_commands
    • $nchan_stub_status_redis_connected_servers
    • $nchan_stub_status_total_ipc_alerts_received
    • $nchan_stub_status_ipc_queued_alerts
    • $nchan_stub_status_total_ipc_send_delay
    • $nchan_stub_status_total_ipc_receive_delay
 
 
 
 
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值