The Stomp class
(PECL stomp >= 0.1.0)
はじめに
Represents a connection between PHP and a Stomp compliant Message Broker.
クラス概要
class Stomp
{
/* メソッド */
public __construct(
string
string
string
array
)
string
$broker
= ini_get("stomp.default_broker_uri"),string
$username
= ?,string
$password
= ?,array
$headers
= ?)
stomp_connect(
string
string
string
array
): resource
string
$broker
= ini_get("stomp.default_broker_uri"),string
$username
= ?,string
$password
= ?,array
$headers
= ?): resource
public __destruct()
}目次
- Stomp::abort — Rolls back a transaction in progress
- Stomp::ack — Acknowledges consumption of a message
- Stomp::begin — Starts a transaction
- Stomp::commit — Commits a transaction in progress
- Stomp::__construct — Opens a connection
- Stomp::__destruct — Closes stomp connection
- Stomp::error — Gets the last stomp error
- Stomp::getReadTimeout — Gets read timeout
- Stomp::getSessionId — Gets the current stomp session ID
- Stomp::hasFrame — Indicates whether or not there is a frame ready to read
- Stomp::readFrame — Reads the next frame
- Stomp::send — Sends a message
- Stomp::setReadTimeout — Sets read timeout
- Stomp::subscribe — Registers to listen to a given destination
- Stomp::unsubscribe — Removes an existing subscription
+add a note
User Contributed Notes 1 note
guilherme dot geronimo at gmail dot com ¶
7 years ago
In some cases (E.g. ActiveMQ), when you have many consumers you need to identify your "client-id" during the connection process, otherwise the server can misunderstand your connection and create new topics/queues:
<?php
$stomp = new Stomp($url, $user, $password, array('client-id'=> $clientId ));
?>
↑ and ↓ to navigate •
Enter to select •
Esc to close
Press Enter without
selection to search using Google