ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
此扩展可从PHP脚本访问消息传递和排队系统的功能,例如IBM WebSphere MQSeries系列产品。该界面旨在使执行更常见的任务(例如将简单的文本消息传递到队列)极其简单,同时仍然允许熟练的用户执行更复杂的消息传递操作。对于许多用户而言,设置众多选项的复杂性可以简单地忽略。 SAM扩展是一个框架,提供了非常简单的API,可用于访问许多消息传递中间件系统。当前,该软件包包括对MQTT(MQ遥测传输)消息传递协议的内置支持以及对IBM Messaging and Queuing中间件产品的支持。SAM被设计为易于扩展以支持其他消息传递系统,并且扩展模块可以用C或PHP编写 简单异步消息(SAM)允许PHP应用程序通过非常简单的界面将消息发送和接收消息到许多不同的消息传递和排队中间件系统 [https://pecl.php.net/package/sam](https://pecl.php.net/package/sam). * [预定义常量](https://www.php.net/manual/en/sam.constants.php) * [例子](https://www.php.net/manual/en/sam.examples.php) * [连接数](https://www.php.net/manual/en/sam.connections.php) * [留言内容](https://www.php.net/manual/en/sam.messages.php) * [消息传递操作](https://www.php.net/manual/en/sam.operations.php) * [发布/订阅和订阅主题](https://www.php.net/manual/en/sam.pubsub.php) * [错误处理](https://www.php.net/manual/en/sam.errors.php) * [SAM功能](https://www.php.net/manual/en/ref.sam.php) * [SAMConnection :: commit](https://www.php.net/manual/en/samconnection.commit.php)—提交(完成)当前工作单元 * [SAMConnection :: connect](https://www.php.net/manual/en/samconnection.connect.php)—建立与Messaging Server的连接 * [SAMConnection :: \_\_ construct](https://www.php.net/manual/en/samconnection.construct.php)—创建与Messaging Server的新连接 * [SAMConnection :: disconnect](https://www.php.net/manual/en/samconnection.disconnect.php)—与Messaging Server断开连接 * [SAMConnection :: errno](https://www.php.net/manual/en/samconnection.errno.php)—包含上次执行的SAM操作的唯一数字错误代码 * [SAMConnection :: error](https://www.php.net/manual/en/samconnection.error.php)—包含上一次失败的SAM操作的文本描述 * [SAMConnection :: isConnected](https://www.php.net/manual/en/samconnection.isconnected.php)—查询是否与Messaging Server建立连接 * [SAMConnection :: peek](https://www.php.net/manual/en/samconnection.peek.php)—从队列中读取消息而不将其从队列中删除 * [SAMConnection :: peekAll](https://www.php.net/manual/en/samconnection.peekall.php)—从队列中读取一个或多个消息,而不将其从队列中删除 * [SAMConnection :: receive](https://www.php.net/manual/en/samconnection.receive.php)—从队列或订阅中接收消息 * [SAMConnection :: remove](https://www.php.net/manual/en/samconnection.remove.php)—从队列中删除消息 * [SAMConnection :: rollback](https://www.php.net/manual/en/samconnection.rollback.php)—取消([回滚](https://www.php.net/manual/en/samconnection.rollback.php))正在进行的工作单元 * [SAMConnection :: send](https://www.php.net/manual/en/samconnection.send.php)—将消息发送到队列或将项目发布到主题 * [SAMConnection :: setDebug](https://www.php.net/manual/en/samconnection.setdebug.php)—打开或关闭其他调试输出 * [SAMConnection :: subscribe](https://www.php.net/manual/en/samconnection.subscribe.php)—创建对指定主题的订阅 * [SAMConnection :: unsubscribe](https://www.php.net/manual/en/samconnection.unsubscribe.php)—取消对指定主题的订阅 * [SAMMessage :: body](https://www.php.net/manual/en/sammessage.body.php)—消息的主体 * [SAMMessage :: \_\_ construct](https://www.php.net/manual/en/sammessage.construct.php)—创建一个新的Message对象 * [SAMMessage :: header](https://www.php.net/manual/en/sammessage.header.php)—消息的标题属性