博客
关于我
pulsar mq 单体验证demo, docker启动pulsar mq验证生产者消费者命令
阅读量:803 次
发布时间:2023-03-04

本文共 398 字,大约阅读时间需要 1 分钟。

进入Pulsar容器并执行脚本操作

  • 进入Pulsar容器
    使用Docker命令进入容器环境:
  • docker exec -it xxx /bin/bash

    切换到bin目录:

    cd bin
    1. 消费主题
      使用Pulsar客户端工具消费指定主题:
    2. ./pulsar-client consume my-topic -s "first-subscription"
      1. 创建新的订阅
        重复上述步骤,创建新的订阅实例:
      2. ./pulsar-client consume my-topic -s "second-subscription"
        1. 发送消息
          在bin目录下,使用生产者命令发送消息:
        2. ./pulsar-client produce my-topic --messages "hello, world!"

          查看生产者和消费者的操作日志

          通过查看日志文件可以确认消息的发送和接收状态,确保Pulsar集群正常运行。

    转载地址:http://ewafk.baihongyu.com/

    你可能感兴趣的文章
    Python SQL和NoSQL数据库操作实战
    查看>>
    python stdout flush_sys.stdout.flush()方法的用法
    查看>>
    python string 运算
    查看>>
    Python str与bytes之间的转换
    查看>>
    Python subprocess ffmpeg
    查看>>
    python subprocess Permission denied Errno 13
    查看>>
    Python subprocess.call - 将变量添加到 subprocess.call
    查看>>
    Python Subprocess.Popen 从一个线程
    查看>>
    Python subprocess.Popen 作为 Windows 上的不同用户
    查看>>
    Python转换PPT为PDF
    查看>>
    Python subprocess.Popen() 等待完成
    查看>>
    Python sum 二维列表中具有相同第一个值的元素
    查看>>
    Python Sympy模块NoConversion:收敛到根失败;请尝试n<;15或MaxSteps>;50
    查看>>
    Python sys.MODULES包含尚未导入的模块
    查看>>
    python sys模块使用
    查看>>
    Python tarfile、zipfile解压模块讲解
    查看>>
    python tcp server传输成功之后进行删除_python学习之路(三)使用socketserver进行ftp断点续传...
    查看>>
    python车牌识别系统+车辆管理+计费系统(图像识别)django框架 计算机毕业设计
    查看>>
    Python threading.Thread 只能使用私有方法 self.__Thread_stop() 停止
    查看>>
    python time模块
    查看>>