qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: released outcome
Date Fri, 26 Aug 2016 19:04:32 GMT
On 26/08/16 18:50, Matt Broadstone wrote:
> Hi all,
>
> It was my understanding that if you replied to a received message with a
> `released` outcome, that the broker would attempt re-delivery to either the
> link that received it or some other attached link. Is that correct?

That is correct.

>  I'm
> not seeing this behavior with this simplified use case (using node-amqp10):
 >
> const amqp = require('amqp10');
> let client = new amqp.Client();
> client.connect('amqp://<some qpidd ip>')
>   .then(() => Promise.all([
>     client.createSender('test.queue'), client.createReceiver('test.queue')
> ]))
>   .spread((sender, receiver) => {
>     let receiveCount = 0;
>     receiver.on('message', msg => {
>       receiveCount++;
>       if (receiveCount === 10) process.exit(0);
>       console.log('received[', receiveCount, '], releasing');
>       receiver.release(msg);
>     });
>
>     return sender.send({ test: 'message' });
>   });

I think you may be accepting before you release? What qpidd sees is:

> 2016-08-26 20:02:36 [Protocol] trace [qpid.127.0.0.1:5672-127.0.0.1:46958]: 1 <- @disposition(21)
[role=true, first=0, last=0, settled=true, state=@accepted(36) [], batchable=false]
> 2016-08-26 20:02:36 [Protocol] trace [qpid.127.0.0.1:5672-127.0.0.1:46958]: 1 <- @disposition(21)
[role=true, first=0, last=0, settled=true, state=@released(38) [], batchable=false]

The second disposition is ignored.

Running the attached release example against qpidd, I see the behaviour 
I would expect:

> $ PN_TRACE_FRM=1 ./release.py
> [0x55ee3ab25570]:  -> SASL
> [0x55ee3ab25570]:  <- SASL
> [0x55ee3ab25570]:0 <- @sasl-mechanisms(64) [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS,
:PLAIN]]
> [0x55ee3ab25570]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS, initial-response=b"anonymous@localhost.localdomain"]
> [0x55ee3ab25570]:0 <- @sasl-outcome(68) [code=0]
> [0x55ee3ab25570]:  -> AMQP
> [0x55ee3ab25570]:0 -> @open(16) [container-id="f8de2985-4cd1-4262-8811-22e44e50a5fc",
hostname="localhost", channel-max=32767]
> [0x55ee3ab25570]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=2147483647]
> [0x55ee3ab25570]:0 -> @attach(18) [name="f8de2985-4cd1-4262-8811-22e44e50a5fc-examples",
handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="examples",
durable=0, timeout=0, dynamic=false], target=@target(41) [durable=0, timeout=0, dynamic=false],
initial-delivery-count=0]
> [0x55ee3ab25570]:0 -> @attach(18) [name="f8de2985-4cd1-4262-8811-22e44e50a5fc-examples",
handle=1, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0,
timeout=0, dynamic=false], target=@target(41) [address="examples", durable=0, timeout=0, dynamic=false],
initial-delivery-count=0]
> [0x55ee3ab25570]:0 -> @flow(19) [incoming-window=2147483647, next-outgoing-id=0, outgoing-window=2147483647,
handle=0, delivery-count=0, link-credit=10, drain=false]
> [0x55ee3ab25570]:  <- AMQP
> [0x55ee3ab25570]:0 <- @open(16) [container-id="a6022696-2483-49f5-8ea6-a6f50db0e7ae",
channel-max=32767, offered-capabilities=@PN_SYMBOL[:"ANONYMOUS-RELAY"], properties={:product="qpid-cpp",
:version="0.35", :platform="Linux", :host="localhost.localdomain"}]
> [0x55ee3ab25570]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=2147483647]
> [0x55ee3ab25570]:0 <- @attach(18) [name="f8de2985-4cd1-4262-8811-22e44e50a5fc-examples",
handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="examples",
durable=0, timeout=0, dynamic=false, distribution-mode=:move], target=@target(41) [durable=0,
timeout=0, dynamic=false], initial-delivery-count=0]
> [0x55ee3ab25570]:0 <- @attach(18) [name="f8de2985-4cd1-4262-8811-22e44e50a5fc-examples",
handle=1, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0,
timeout=0, dynamic=false], target=@target(41) [address="examples", durable=0, timeout=0, dynamic=false],
initial-delivery-count=0]
> [0x55ee3ab25570]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, next-outgoing-id=0,
outgoing-window=2147483647, handle=1, delivery-count=0, link-credit=500, drain=false]
> [0x55ee3ab25570]:0 -> @transfer(20) [handle=1, delivery-id=0, delivery-tag=b"1", message-format=0,
settled=false, more=false] (78) "\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 <- @flow(19) [next-incoming-id=1, incoming-window=2147483647, next-outgoing-id=0,
outgoing-window=2147483647, handle=1, delivery-count=1, link-credit=500, drain=false]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"\x00\x00\x00\x00",
message-format=0, settled=false, more=false] (70) "\x00Sp\xc0\x06\x04BP\x04@A\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 <- @disposition(21) [role=true, first=0, last=0, settled=true,
state=@accepted(36) []]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=0, last=0, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=1, delivery-tag=b"\x00\x00\x00\x01",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=2, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=2, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=1, last=1, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=2, delivery-tag=b"\x00\x00\x00\x02",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=3, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=3, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=2, last=2, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=3, delivery-tag=b"\x00\x00\x00\x03",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=4, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=4, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=3, last=3, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=4, delivery-tag=b"\x00\x00\x00\x04",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=5, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=5, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=4, last=4, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=5, delivery-tag=b"\x00\x00\x00\x05",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=6, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=6, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=5, last=5, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=6, delivery-tag=b"\x00\x00\x00\x06",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=7, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=7, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=6, last=6, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=7, delivery-tag=b"\x00\x00\x00\x07",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=8, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=8, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=7, last=7, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=8, delivery-tag=b"\x00\x00\x00\x08",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @flow(19) [next-incoming-id=9, incoming-window=2147483647, next-outgoing-id=1,
outgoing-window=2147483647, handle=0, delivery-count=9, link-credit=9, drain=false]
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=8, last=8, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 <- @transfer(20) [handle=0, delivery-id=9, delivery-tag=b"\x00\x00\x00\x09",
message-format=0, settled=false, more=false] (85) "\x00Sp\xc0\x06\x04BP\x04@A\x00Sr\xd1\x00\x00\x00\x07\x00\x00\x00\x02\xa1\x00@\x00Ss\xd0\x00\x00\x00"\x00\x00\x00\x0d@@@@@@@@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00Sw\xa1\x0ctest
message"
> [0x55ee3ab25570]:0 -> @disposition(21) [role=true, first=9, last=9, settled=true,
state=@modified(39) [delivery-failed=false, undeliverable-here=false]]
> [0x55ee3ab25570]:0 -> @detach(22) [handle=0, closed=true]
> [0x55ee3ab25570]:0 -> @close(24) []
> [0x55ee3ab25570]:  -> EOS
> [0x55ee3ab25570]:0 <- @detach(22) [handle=0, closed=true]
> [0x55ee3ab25570]:0 <- @close(24) []
> [0x55ee3ab25570]:  <- EOS



Mime
View raw message