From 036dc412c076fe91ff238b1f090f484caf808699 Mon Sep 17 00:00:00 2001 From: Bahri Rizaldi Date: Wed, 2 Nov 2022 14:50:52 +0700 Subject: [PATCH 1/2] Expose deliveryTag from AmqpMessage --- lib/src/client/amqp_message.dart | 3 +++ lib/src/client/impl/amqp_message_impl.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/src/client/amqp_message.dart b/lib/src/client/amqp_message.dart index ef9853f..6538794 100644 --- a/lib/src/client/amqp_message.dart +++ b/lib/src/client/amqp_message.dart @@ -24,6 +24,9 @@ abstract class AmqpMessage { /// exchange (e.g. posted directly to a queue). String? get routingKey; + /// Get the [deliveryTag] for this message. + int get deliveryTag; + /// Get the [properties] that were included with the message metadata MessageProperties? get properties; diff --git a/lib/src/client/impl/amqp_message_impl.dart b/lib/src/client/impl/amqp_message_impl.dart index 8312e40..2503769 100644 --- a/lib/src/client/impl/amqp_message_impl.dart +++ b/lib/src/client/impl/amqp_message_impl.dart @@ -23,6 +23,9 @@ class _AmqpMessageImpl implements AmqpMessage { @override String get routingKey => (message.message as BasicDeliver).routingKey; + + @override + int get deliveryTag => (message.message as BasicDeliver).deliveryTag; @override void reply(Object responseMessage, From aa0259ebec002c695bbf847d2cc8189ea3c86b1b Mon Sep 17 00:00:00 2001 From: Bahri Rizaldi Date: Thu, 3 Nov 2022 17:05:13 +0700 Subject: [PATCH 2/2] Fix formatting --- lib/src/client/impl/amqp_message_impl.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/client/impl/amqp_message_impl.dart b/lib/src/client/impl/amqp_message_impl.dart index 2503769..54088fe 100644 --- a/lib/src/client/impl/amqp_message_impl.dart +++ b/lib/src/client/impl/amqp_message_impl.dart @@ -23,7 +23,7 @@ class _AmqpMessageImpl implements AmqpMessage { @override String get routingKey => (message.message as BasicDeliver).routingKey; - + @override int get deliveryTag => (message.message as BasicDeliver).deliveryTag;