[
https://issues.apache.org/jira/browse/QPIDJMS-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055966#comment-16055966
]
Timothy Bish commented on QPIDJMS-296:
--------------------------------------
In this case it doesn't actually seem to be doing anything wrong as the spec
states:
{quote}
When an application initiates a message transfer, it assigns a delivery-tag
used to track the state of the delivery while the message is in transit. A
delivery is considered unsettled at the sender/receiver from the point at which
it was sent/received until it has been settled by the sending/receiving
application. Each delivery MUST be identified by a delivery-tag chosen by the
sending application. The delivery-tag MUST be unique amongst all deliveries
that could be considered unsettled by either end of the link.
{quote}
It appears the remote settled the incoming delivery prior to the send of the
second transfer which would result in the transfer now being considered settled
by both sides so the client can reuse the tag again as it is doing here.
> JMS client does not assign unique deliveryTag for messages sent on the same
> link
> --------------------------------------------------------------------------------
>
> Key: QPIDJMS-296
> URL: https://issues.apache.org/jira/browse/QPIDJMS-296
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 0.23.0
> Reporter: Lorenz Quack
>
> I am creating a {{MessageProducer}} and sending two messages. In the protocol
> trace I can see that the two transfers are using the same deliveryTag. This
> is in violation of the AMQP1.0 specification. [Section
> 2.7.5|http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-transfer]
> states with regards to the {{delivery-tag}}:
> bq. Uniquely identifies the delivery attempt for a given message on this
> link. This field MUST be specified for the first transfer of a multi-transfer
> message and can only be omitted for continuation transfers.
> This a snippet of code:
> {code}
> Connection connection = getConnectionWithPrefetch(0);
> connection.start();
> Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
> Queue queue = session.createQueue("testQueue");
> MessageProducer producer = session.createProducer(queue);
> producer.send(session.createMessage());
> producer.send(session.createMessage());
> {code}
> Excerpt from the protocol trace:
> {noformat}
> [1583014487:1] ->
> Attach{name='qpid-jms:sender:ID:0172b04b-3bc8-4e30-a589-57a9dae031aa:1:1:2:ZeroPrefetchTest-testZeroPrefetch',
> handle=1, role=SENDER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST,
> source=Source{address='ID:0172b04b-3bc8-4e30-a589-57a9dae031aa:1:1:2',
> durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false,
> dynamicNodeProperties=null, distributionMode=null, filter=null,
> defaultOutcome=null, outcomes=[amqp:accepted:list, amqp:rejected:list,
> amqp:released:list, amqp:modified:list], capabilities=null},
> target=Target{address='ZeroPrefetchTest-testZeroPrefetch', durable=NONE,
> expiryPolicy=SESSION_END, timeout=0, dynamic=false,
> dynamicNodeProperties=null, capabilities=[queue]}, unsettled=null,
> incompleteUnsettled=false, initialDeliveryCount=0, maxMessageSize=null,
> offeredCapabilities=null, desiredCapabilities=[DELAYED_DELIVERY],
> properties=null}
> [1583014487:1] <-
> Attach{name='qpid-jms:sender:ID:0172b04b-3bc8-4e30-a589-57a9dae031aa:1:1:2:ZeroPrefetchTest-testZeroPrefetch',
> handle=1, role=RECEIVER, sndSettleMode=UNSETTLED, rcvSettleMode=FIRST,
> source=Source{address='ID:0172b04b-3bc8-4e30-a589-57a9dae031aa:1:1:2',
> durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false,
> dynamicNodeProperties=null, distributionMode=null, filter=null,
> defaultOutcome=null, outcomes=[amqp:accepted:list, amqp:rejected:list,
> amqp:released:list, amqp:modified:list], capabilities=null},
> target=Target{address='ZeroPrefetchTest-testZeroPrefetch', durable=NONE,
> expiryPolicy=SESSION_END, timeout=0, dynamic=false,
> dynamicNodeProperties=null, capabilities=[REJECT_UNROUTABLE,
> DELAYED_DELIVERY]}, unsettled={}, incompleteUnsettled=false,
> initialDeliveryCount=null, maxMessageSize=null,
> offeredCapabilities=[REJECT_UNROUTABLE, DELAYED_DELIVERY],
> desiredCapabilities=null, properties={}}
> [1583014487:1] <- Flow{nextIncomingId=2, incomingWindow=8192,
> nextOutgoingId=0, outgoingWindow=2048, handle=1, deliveryCount=0,
> linkCredit=20000, available=null, drain=false, echo=false, properties=null}
> [1583014487:1] -> Transfer{handle=1, deliveryId=1, deliveryTag=0,
> messageFormat=0, settled=null, more=false, rcvSettleMode=null, state=null,
> resume=false, aborted=false, batchable=false} (165)
> "\x00Sp\xc0\x02\x01A\x00Sr\xc1)\x04\xa3\x0ex-opt-jms-destQ\x00\xa3\x12x-opt-jms-msg-typeQ\x00\x00Ss\xc0k\x0a\xa1/ID:0172b04b-3bc8-4e30-a589-57a9dae031aa:1:1:2-1\xa0\x05guest\xa1!ZeroPrefetchTest-testZeroPrefetch@@@@@@\x83\x00\x00\x01\x5c\xc6\x0c\x04\xe3"
> [1583014487:1] <- Disposition{role=RECEIVER, first=1, last=1, settled=true,
> state=Accepted{}, batchable=false}
> [1583014487:1] -> Transfer{handle=1, deliveryId=2, deliveryTag=0,
> messageFormat=0, settled=null, more=false, rcvSettleMode=null, state=null,
> resume=false, aborted=false, batchable=false} (165)
> "\x00Sp\xc0\x02\x01A\x00Sr\xc1)\x04\xa3\x0ex-opt-jms-destQ\x00\xa3\x12x-opt-jms-msg-typeQ\x00\x00Ss\xc0k\x0a\xa1/ID:0172b04b-3bc8-4e30-a589-57a9dae031aa:1:1:2-2\xa0\x05guest\xa1!ZeroPrefetchTest-testZeroPrefetch@@@@@@\x83\x00\x00\x01\x5c\xc6\x0c\x04\xf1"
> [1583014487:1] <- Disposition{role=RECEIVER, first=2, last=2, settled=true,
> state=Accepted{}, batchable=false}
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]