bmiamqplib
v1.0.25
Published
amqplib进一步封装
Downloads
58
Readme
简介
myamqplib
是对amqplib
进一步封装,以优化调用步骤
接口
- SendRPCToExchangeOrQueue 发送RPC请求给mq中的queue(第一个参数中只给
queue
成员赋值),或者发送给exchange(第一个参数中只给exchangeInfo
成员赋值,queue忽略)。并等待回复,超时时间没有回复会返还超时的错误。 - SendToExchangeOrQueue 发送消息给mq中的queue(第一个参数中只给
queue
成员赋值),或者发送给exchange(第一个参数中只给exchangeInfo
成员赋值,queue忽略)。 - ServerForRequest 在指定queue上接收消息,根据接收到消息的
msgtype
来调用相应的处理函数,如果发送的消息里有replyto
,处理结果会返回给replyto
,如果没有replyto
,就会根据处理结果来处理消息(成功就从队列中删除,失败就放回队列)。 - GetQueueMessageCount 获取指定queue中的消息个数。如果queue不存在,那么就会触发错误,导致当前的channel被关闭。