python接收solace管道信息

从git里抄了抄,能用就行。

安装依赖:

autopep8==1.6.0
certifi==2020.12.5
chardet==4.0.0
idna==2.10
pycodestyle==2.8.0
requests==2.25.1
solace-pubsubplus==1.6.0
toml==0.10.2
urllib3==1.26.4

autopep8==1.6.0
chardet==4.0.0
pycodestyle==2.8.0
solace-pubsubplus==1.6.0
toml==0.10.2

官方git里抄的类:

import threading
from datetime import datetime
import time
from concurrent.futures.thread import ThreadPoolExecutor
from typing import TypeVar
from solace.messaging.messaging_service import MessagingService
from solace.messaging.config.solace_properties import transport_layer_properties, service_properties, \
    authentication_properties
from solace.messaging.config.solace_properties.message_properties import CORRELATION_ID, PRIORITY
from solace.messaging.receiver.inbound_message import InboundMessage
from solace.messaging.resources.queue import Queue
from solace.messaging.resources.topic import Topic
from solace.messaging.resources.topic_subscription import TopicSubscription
import os

class SamplerBoot:
    """this class is created for instantiating the broker properties from environment"""

    properties_from_external_file_name = 'solbroker_properties.json'

 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值