File: AMQP.php

package info (click to toggle)
php-amqp 2.1.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,536 kB
  • sloc: ansic: 7,295; xml: 1,162; php: 690; pascal: 49; makefile: 2
file content (166 lines) | stat: -rw-r--r-- 4,640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
/**
 * Passing in this constant as a flag will forcefully disable all other flags.
 * Use this if you want to temporarily disable the amqp.auto_ack ini setting.
 */
const AMQP_NOPARAM = 0;

/**
 * Passing in this constant as a flag to proper methods will forcefully ignore all other flags.
 * Do not send basic.consume request during AMQPQueue::consume(). Use this if you want to run callback on top of previously
 * declared consumers.
 */
const AMQP_JUST_CONSUME = 1;

/**
 * Durable exchanges and queues will survive a broker restart, complete with all of their data.
 */
const AMQP_DURABLE = 2;

/**
 * Passive exchanges and queues will not be redeclared, but the broker will throw an error if the exchange or queue does not exist.
 */
const AMQP_PASSIVE = 4;

/**
 * Valid for queues only, this flag indicates that only one client can be listening to and consuming from this queue.
 */
const AMQP_EXCLUSIVE = 8;

/**
 * For exchanges, the auto delete flag indicates that the exchange will be deleted as soon as no more queues are bound
 * to it. If no queues were ever bound the exchange, the exchange will never be deleted. For queues, the auto delete
 * flag indicates that the queue will be deleted as soon as there are no more listeners subscribed to it. If no
 * subscription has ever been active, the queue will never be deleted. Note: Exclusive queues will always be
 * automatically deleted with the client disconnects.
 */
const AMQP_AUTODELETE = 16;

/**
 * Clients are not allowed to make specific queue bindings to exchanges defined with this flag.
 */
const AMQP_INTERNAL = 32;

/**
 * When passed to the consume method for a clustered environment, do not consume from the local node.
 */
const AMQP_NOLOCAL = 64;

/**
 * When passed to the {@link AMQPQueue::get()} and {@link AMQPQueue::consume()} methods as a flag,
 * the messages will be immediately marked as acknowledged by the server upon delivery.
 */
const AMQP_AUTOACK = 128;

/**
 * Passed on queue creation, this flag indicates that the queue should be deleted if it becomes empty.
 */
const AMQP_IFEMPTY = 256;

/**
 * Passed on queue or exchange creation, this flag indicates that the queue or exchange should be
 * deleted when no clients are connected to the given queue or exchange.
 */
const AMQP_IFUNUSED = 512;

/**
 * When publishing a message, the message must be routed to a valid queue. If it is not, an error will be returned.
 */
const AMQP_MANDATORY = 1024;

/**
 * When publishing a message, mark this message for immediate processing by the broker. (High priority message.)
 */
const AMQP_IMMEDIATE = 2048;

/**
 * If set during a call to {@link AMQPQueue::ack()}, the delivery tag is treated as "up to and including", so that multiple
 * messages can be acknowledged with a single method. If set to zero, the delivery tag refers to a single message.
 * If the AMQP_MULTIPLE flag is set, and the delivery tag is zero, this indicates acknowledgement of all outstanding
 * messages.
 */
const AMQP_MULTIPLE = 4096;

/**
 * If set during a call to {@link AMQPExchange::bind()}, the server will not respond to the method.The client should not wait
 * for a reply method. If the server could not complete the method it will raise a channel or connection exception.
 */
const AMQP_NOWAIT = 8192;

/**
 * If set during a call to {@link AMQPQueue::nack()}, the message will be placed back to the queue.
 */
const AMQP_REQUEUE = 16384;

/**
 * A direct exchange type.
 */
const AMQP_EX_TYPE_DIRECT = 'direct';

/**
 * A fanout exchange type.
 */
const AMQP_EX_TYPE_FANOUT = 'fanout';

/**
 * A topic exchange type.
 */
const AMQP_EX_TYPE_TOPIC = 'topic';

/**
 * A header exchange type.
 */
const AMQP_EX_TYPE_HEADERS = 'headers';


const AMQP_OS_SOCKET_TIMEOUT_ERRNO = 536870947;



const PHP_AMQP_MAX_CHANNELS = 256;


const AMQP_SASL_METHOD_PLAIN = 0;


const AMQP_SASL_METHOD_EXTERNAL = 1;

/**
 * Default delivery mode, keeps the message in memory when the message is placed in a queue.
 */
const AMQP_DELIVERY_MODE_TRANSIENT = 1;

/**
 * Writes the message to the disk when the message is placed in a durable queue.
 */
const AMQP_DELIVERY_MODE_PERSISTENT = 2;

/**
 * Extension version string
 */
const AMQP_EXTENSION_VERSION = '1.1.12alpha3';

/**
 * Extension major version
 */
const AMQP_EXTENSION_VERSION_MAJOR = 0;

/**
 * Extension minor version
 */
const AMQP_EXTENSION_VERSION_MINOR = 1;

/**
 * Extension patch version
 */
const AMQP_EXTENSION_VERSION_PATCH = 12;

/**
 * Extension extra version suffix
 */
const AMQP_EXTENSION_VERSION_EXTRA = 'alpha3';

/**
 * Extension version ID
 */
const AMQP_EXTENSION_VERSION_ID = '10112';