You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+46-33
Original file line number
Diff line number
Diff line change
@@ -60,34 +60,47 @@ The following table summarizes the methods available to an AMQP client. For deta
60
60
61
61
The following table summarizes the methods available to an AMQP channel obtained via the `channel()` method of a `client` instance. For detailed documentation on each method and its arguments please consult the class [documentation](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/client/channel.dart).
62
62
63
-
| Method | Description
64
-
|--------------------|------------------
65
-
| close() | Close the channel and abort any pending operations.
66
-
| queue() | Define a named queue.
67
-
| privateQueue() | Define a private queue with a random name that will be deleted when the channel closes.
68
-
| exchange() | Define an exchange that can be used to route messages to multiple recipients.
69
-
| qos() | Manage the QoS settings for the channel (prefetech size & count).
70
-
| ack() | Acknowledge a message by its id.
71
-
| select() | Begin a transaction.
72
-
| commit() | Commit a transaction.
73
-
| rollback() | Rollback a transaction.
74
-
| flow() | Control message flow.
75
-
| recover() | Recover unacknowledged messages.
76
-
| basicReturnListener()| Get a StreamSubscription for handling undelivered messages.
63
+
| Method | Description
64
+
|----------------------------|
65
+
| close() | Close the channel and abort any pending operations.
66
+
| queue() | Define a named queue.
67
+
| privateQueue() | Define a private queue with a random name that will be deleted when the channel closes.
68
+
| exchange() | Define an exchange that can be used to route messages to multiple recipients.
69
+
| qos() | Manage the QoS settings for the channel (prefetech size & count).
70
+
| ack() | Acknowledge a message by its id.
71
+
| select() | Begin a transaction.
72
+
| commit() | Commit a transaction.
73
+
| rollback() | Rollback a transaction.
74
+
| flow() | Control message flow.
75
+
| recover() | Recover unacknowledged messages.
76
+
| basicReturnListener() | Get a StreamSubscription for handling undelivered messages.
77
+
| confirmPublishedMessages() | Request that the broker ACKs/NACKs the handling of published messages.
78
+
| publishNotifier() | Register a listener for publish notifications emitted by the broker.
79
+
80
+
The `confirmPublishedMessages` and `publishNotifier` methods leverage the _publisher confirms_
Notifications obtained using this mechanism only guarantee that the broker has
84
+
either processed (persisted) a published message successfully or it has dropped
85
+
it (e.g. out of disk space). Applications should never assume that receiving an
86
+
ACK from the broker for a published message means that a consumer has
87
+
successfully processed the message. As demonstrated by [examples/confirm](https://github.com/achilleasa/dart_amqp/blob/master/examples/confirm),
88
+
the broker will ACK messages published to a queue even if there are no consumers listening
89
+
on the other end.
77
90
78
91
## Exchanges
79
92
80
93
The following table summarizes the methods available to an AMQP exchange declared via the the `exchange()` method of a `channel` instance. For detailed documentation on each method and its arguments please consult the class [documentation](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/client/exchange.dart).
81
94
82
-
| Method | Description
83
-
|--------------------|------------------
84
-
| name() | A getter for the exchange name.
85
-
| type() | A getter for the exchange [type](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/enums/exchange_type.dart).
86
-
| channel() | A getter for the [channel](#channels) where this exchange was declared.
87
-
| delete() | Delete the exchange.
88
-
| publish() | Publish message using a routing key
95
+
| Method | Description
96
+
|----------------------------|
97
+
| name() | A getter for the exchange name.
98
+
| type() | A getter for the exchange [type](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/enums/exchange_type.dart).
99
+
| channel() | A getter for the [channel](#channels) where this exchange was declared.
100
+
| delete() | Delete the exchange.
101
+
| publish() | Publish message using a routing key
89
102
| bindPrivateQueueConsumer() | Convenience method that allocates a private [queue](#queues), binds it to the exchange via a routing key and returns a [consumer](#consumers) for processing messages.
90
-
| bindQueueConsumer() | Convenience method that allocates a named [queue](#queues), binds it to the exchange via a routing key and returns a [consumer](#consumers) for processing messages.
103
+
| bindQueueConsumer() | Convenience method that allocates a named [queue](#queues), binds it to the exchange via a routing key and returns a [consumer](#consumers) for processing messages.
91
104
92
105
## Queues
93
106
@@ -122,17 +135,17 @@ Queue consumers are essentially StreamControllers that emit a `Stream<AmqpMessag
122
135
payload of the incoming message as well as the incoming message properties
123
136
and provides helper methods for replying, ack-ing and rejecting messages. The following table summarizes the methods provided by `AmqpMessage`. For detailed documentation on each method and its arguments please consult the class [documentation](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/client/amqp_message.dart).
124
137
125
-
| Method | Description
126
-
|--------------------|------------------
127
-
| payload() | A getter for retrieving the raw message paylaod as an Uint8List.
128
-
| payloadAsString() | A getter for retrieving the message payload as an UTF8 String.
129
-
| payloadAsJson() | A getter for retrieving the message payload as a parsed JSON document.
130
-
| exchangeName() | A getter for the [exchange](#exchanges) where the message was published.
131
-
| routingKey() | A getter for the routing key used for publishing this message.
132
-
| properties() | A getter for retrieving message [properties](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/protocol/messages/message_properties.dart).
133
-
| ack() | Acknowledge this message.
134
-
| reply() | Reply to the message sender with a new message.
135
-
| reject() | Reject this message.
138
+
| Method | Description
139
+
|-------------------|
140
+
| payload() | A getter for retrieving the raw message paylaod as an Uint8List.
141
+
| payloadAsString() | A getter for retrieving the message payload as an UTF8 String.
142
+
| payloadAsJson() | A getter for retrieving the message payload as a parsed JSON document.
143
+
| exchangeName() | A getter for the [exchange](#exchanges) where the message was published.
144
+
| routingKey() | A getter for the routing key used for publishing this message.
145
+
| properties() | A getter for retrieving message [properties](https://github.com/achilleasa/dart_amqp/blob/master/lib/src/protocol/messages/message_properties.dart).
146
+
| ack() | Acknowledge this message.
147
+
| reply() | Reply to the message sender with a new message.
Copy file name to clipboardExpand all lines: README.md
+1
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ Main features:
10
10
- supports PLAIN and AMQPLAIN authentication providers while other authentication schemes can be plugged in by implementing the appropriate interface.
11
11
- implements the entire 0.9.1 protocol specification (except basic get and recover-async)
12
12
- supports both plain-text and TLS connections
13
+
- supports publish confirmations
13
14
14
15
Things not working yet:
15
16
- the driver does not currently support recovering client topologies when re-establishing connections. This feature may be implemented in a future version.
Copy file name to clipboardExpand all lines: example/example.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -59,4 +59,5 @@ functionality. If you need RPC support for your application you may want to cons
59
59
60
60
# Additional examples
61
61
62
-
The [example](https://github.com/achilleasa/dart_amqp/tree/master/example) folder contains implementations of the six RabbitMQ getting started [tutorials](https://www.rabbitmq.com/getstarted.html).
62
+
The [example](https://github.com/achilleasa/dart_amqp/tree/master/example) folder contains implementations of the six RabbitMQ getting started [tutorials](https://www.rabbitmq.com/getstarted.html)
63
+
plus an [extra](https://github.com/achilleasa/dart_amqp/tree/master/example/confirm) example of working with publish confirmations.
0 commit comments