DVAmqpSocketChannel class
A connection to RabbitMQ speaking AMQP 0-9-1 over a socket.
Deliberately partial. This implements the methods a durable queue needs -- declare, publish, get, ack, reject, purge -- and not the rest of the protocol. A general AMQP client is a package of its own; this is the transport one adapter requires, and it says so rather than half-implementing a specification.
A frame is type | channel | size | payload | 0xCE. Method frames carry a
class and method id and then arguments packed by type. There is no room
for interpretation here: the byte layout is the protocol.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
ack(
int deliveryTag) → Future< void> -
Acknowledge, removing it from the broker.
override
-
close(
) → Future< void> - Close the channel's socket.
-
declareQueue(
String name, {required bool durable}) → Future< void> -
Declare a durable queue, creating it if absent.
override
-
get(
String queue) → Future< DVAmqpMessage?> -
Take one message without acknowledging it, or null when none is waiting.
override
-
nack(
int deliveryTag, {required bool requeue}) → Future< void> -
Reject, and requeue it or send it to the dead-letter exchange.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publish(
String queue, List< int> body, {required bool persistent, int priority = 0}) → Future<void> -
Publish to the default exchange, routed by queue name.
override
-
purge(
String queue) → Future< int> -
Remove every message, returning how many went.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited