[jira] [Commented] (QPID-7769) [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte) to maximise compatibility with other AMQP implementations

2017-05-12 Thread Alex Rudyy (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16008206#comment-16008206
 ] 

Alex Rudyy commented on QPID-7769:
--

The implemented changes look reasonable to me. I raised JIRA QPID-7780 to 
improve converters in order to convert unsigned numbers into their unsigned 
equivalents on the target protocols.

> [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B 
> (unsigned byte) to maximise compatibility with other AMQP implementations
> --
>
> Key: QPID-7769
> URL: https://issues.apache.org/jira/browse/QPID-7769
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Currently the Broker fails on some paths if it tries to decode message 
> headers using type codes u (unsigned short) and B (unsigned byte). It should 
> understand these too.
> Flow to disk path fails like so:
> {noformat}
> 2017-05-02 20:21:34,515 ERROR [IO-/127.0.0.1:35664] (o.a.q.s.Main) - Uncaught 
> exception, shutting down.
> java.lang.IllegalArgumentException: no such type code: 42
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypeMap.getType(AMQTypeMap.java:47)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypedValue.readFromBuffer(AMQTypedValue.java:201)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.setFromBuffer(FieldTable.java:1163)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.populateFromBuffer(FieldTable.java:128)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.clearEncodedForm(FieldTable.java:933)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.BasicContentHeaderProperties.clearEncodedForm(BasicContentHeaderProperties.java:959)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody.clearEncodedForm(ContentHeaderBody.java:195)
> at 
> org.apache.qpid.server.protocol.v0_8.MessageMetaData.clearEncodedForm(MessageMetaData.java:140)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$MessageDataSoftRef.clear(AbstractBDBMessageStore.java:986)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.flowToDisk(AbstractBDBMessageStore.java:1263)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskIfNecessary(AbstractQueue.java:3342)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskAndReportIfNecessary(AbstractQueue.java:3350)
> at 
> org.apache.qpid.server.queue.AbstractQueue.enqueue(AbstractQueue.java:1105)
> at 
> org.apache.qpid.server.message.RoutingResult$1.postCommit(RoutingResult.java:136)
> at 
> org.apache.qpid.server.txn.LocalTransaction$4.postCommit(LocalTransaction.java:304)
> at 
> org.apache.qpid.server.txn.LocalTransaction.doPostTransactionActions(LocalTransaction.java:433)
> at 
> org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:417)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1132)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3407)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.processMethod(ServerDecoder.java:229)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processFrame(AMQDecoder.java:203)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:141)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:65)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processInput(AMQDecoder.java:185)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:104)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:97)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processAMQPFrames(BrokerDecoder.java:96)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.decode(AMQDecoder.java:118)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.decodeBuffer(ServerDecoder.java:44)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:247)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:239)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> 

[jira] [Commented] (QPID-7769) [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte) to maximise compatibility with other AMQP implementations

2017-05-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16004275#comment-16004275
 ] 

ASF subversion and git services commented on QPID-7769:
---

Commit 66a15452ae1da2d2a3460db93505ac02764e6f5d in qpid-broker-j's branch 
refs/heads/master from [~k-wall]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=66a1545 ]

QPID-7769: [AMQP0-8..0-91] Avoid possibility of the QBB going undisposed if 
field table decoding fails

Made QBB's autoclosable so they may be used from try-with-resources.


> [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B 
> (unsigned byte) to maximise compatibility with other AMQP implementations
> --
>
> Key: QPID-7769
> URL: https://issues.apache.org/jira/browse/QPID-7769
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Currently the Broker fails on some paths if it tries to decode message 
> headers using type codes u (unsigned short) and B (unsigned byte). It should 
> understand these too.
> Flow to disk path fails like so:
> {noformat}
> 2017-05-02 20:21:34,515 ERROR [IO-/127.0.0.1:35664] (o.a.q.s.Main) - Uncaught 
> exception, shutting down.
> java.lang.IllegalArgumentException: no such type code: 42
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypeMap.getType(AMQTypeMap.java:47)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypedValue.readFromBuffer(AMQTypedValue.java:201)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.setFromBuffer(FieldTable.java:1163)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.populateFromBuffer(FieldTable.java:128)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.clearEncodedForm(FieldTable.java:933)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.BasicContentHeaderProperties.clearEncodedForm(BasicContentHeaderProperties.java:959)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody.clearEncodedForm(ContentHeaderBody.java:195)
> at 
> org.apache.qpid.server.protocol.v0_8.MessageMetaData.clearEncodedForm(MessageMetaData.java:140)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$MessageDataSoftRef.clear(AbstractBDBMessageStore.java:986)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.flowToDisk(AbstractBDBMessageStore.java:1263)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskIfNecessary(AbstractQueue.java:3342)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskAndReportIfNecessary(AbstractQueue.java:3350)
> at 
> org.apache.qpid.server.queue.AbstractQueue.enqueue(AbstractQueue.java:1105)
> at 
> org.apache.qpid.server.message.RoutingResult$1.postCommit(RoutingResult.java:136)
> at 
> org.apache.qpid.server.txn.LocalTransaction$4.postCommit(LocalTransaction.java:304)
> at 
> org.apache.qpid.server.txn.LocalTransaction.doPostTransactionActions(LocalTransaction.java:433)
> at 
> org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:417)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1132)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3407)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.processMethod(ServerDecoder.java:229)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processFrame(AMQDecoder.java:203)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:141)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:65)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processInput(AMQDecoder.java:185)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:104)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:97)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processAMQPFrames(BrokerDecoder.java:96)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.decode(AMQDecoder.java:118)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.decodeBuffer(ServerDecoder.java:44)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:247)
> at 
> 

[jira] [Commented] (QPID-7769) [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte) to maximise compatibility with other AMQP implementations

2017-05-07 Thread Keith Wall (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1531#comment-1531
 ] 

Keith Wall commented on QPID-7769:
--

Commit 75be65b adds support to the Broker to understand the {u}  and {B} type 
codes.  I took a look at the public available AMQP 0-91 implementations 
(RabbitMQ's Java and .NET client and squaremo's amqplib) and found that they no 
longer use either, nor does the Qpid Python 0-9 codec. The only client I can 
see of that was capable of producing the B type encoding was the old Qpid .NET 
v0.8 client, which I know to be still in production use.  Following the 
robustness principle, I think it reasonable for the Broker to understand {u}  
and {B} type codes but should not use these encodings when converting messages 
for 0-8..0-91 clients. I think there is a argument for the Qpid JMS 0-x client 
to understand them too. 

There is a separate wider question about how the Broker should handle messages 
that it has ingested successfully only to later discover they are somehow bad.  
To crash seems unreasonable.  



> [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B 
> (unsigned byte) to maximise compatibility with other AMQP implementations
> --
>
> Key: QPID-7769
> URL: https://issues.apache.org/jira/browse/QPID-7769
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Currently the Broker fails on some paths if it tries to decode message 
> headers using type codes u (unsigned short) and B (unsigned byte). It should 
> understand these too.
> Flow to disk path fails like so:
> {noformat}
> 2017-05-02 20:21:34,515 ERROR [IO-/127.0.0.1:35664] (o.a.q.s.Main) - Uncaught 
> exception, shutting down.
> java.lang.IllegalArgumentException: no such type code: 42
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypeMap.getType(AMQTypeMap.java:47)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypedValue.readFromBuffer(AMQTypedValue.java:201)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.setFromBuffer(FieldTable.java:1163)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.populateFromBuffer(FieldTable.java:128)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.clearEncodedForm(FieldTable.java:933)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.BasicContentHeaderProperties.clearEncodedForm(BasicContentHeaderProperties.java:959)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody.clearEncodedForm(ContentHeaderBody.java:195)
> at 
> org.apache.qpid.server.protocol.v0_8.MessageMetaData.clearEncodedForm(MessageMetaData.java:140)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$MessageDataSoftRef.clear(AbstractBDBMessageStore.java:986)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.flowToDisk(AbstractBDBMessageStore.java:1263)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskIfNecessary(AbstractQueue.java:3342)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskAndReportIfNecessary(AbstractQueue.java:3350)
> at 
> org.apache.qpid.server.queue.AbstractQueue.enqueue(AbstractQueue.java:1105)
> at 
> org.apache.qpid.server.message.RoutingResult$1.postCommit(RoutingResult.java:136)
> at 
> org.apache.qpid.server.txn.LocalTransaction$4.postCommit(LocalTransaction.java:304)
> at 
> org.apache.qpid.server.txn.LocalTransaction.doPostTransactionActions(LocalTransaction.java:433)
> at 
> org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:417)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1132)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3407)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.processMethod(ServerDecoder.java:229)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processFrame(AMQDecoder.java:203)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:141)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:65)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processInput(AMQDecoder.java:185)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:104)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:97)
> at 

[jira] [Commented] (QPID-7769) [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte) to maximise compatibility with other AMQP implementations

2017-05-05 Thread Rob Godfrey (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15997923#comment-15997923
 ] 

Rob Godfrey commented on QPID-7769:
---

{quote}
TODO: confirm behaviour on message selection and management).
{quote}
And message conversion (e.g. 0-9 to 1.0)? 

> [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B 
> (unsigned byte) to maximise compatibility with other AMQP implementations
> --
>
> Key: QPID-7769
> URL: https://issues.apache.org/jira/browse/QPID-7769
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> Currently the Broker fails on some paths if it tries to decode message 
> headers using type codes u (unsigned short) and B (unsigned byte). It should 
> understand these too.
> Flow to disk path fails like so:
> {noformat}
> 2017-05-02 20:21:34,515 ERROR [IO-/127.0.0.1:35664] (o.a.q.s.Main) - Uncaught 
> exception, shutting down.
> java.lang.IllegalArgumentException: no such type code: 42
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypeMap.getType(AMQTypeMap.java:47)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQTypedValue.readFromBuffer(AMQTypedValue.java:201)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.setFromBuffer(FieldTable.java:1163)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.populateFromBuffer(FieldTable.java:128)
> at 
> org.apache.qpid.server.protocol.v0_8.FieldTable.clearEncodedForm(FieldTable.java:933)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.BasicContentHeaderProperties.clearEncodedForm(BasicContentHeaderProperties.java:959)
> at 
> org.apache.qpid.server.protocol.v0_8.transport.ContentHeaderBody.clearEncodedForm(ContentHeaderBody.java:195)
> at 
> org.apache.qpid.server.protocol.v0_8.MessageMetaData.clearEncodedForm(MessageMetaData.java:140)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$MessageDataSoftRef.clear(AbstractBDBMessageStore.java:986)
> at 
> org.apache.qpid.server.store.berkeleydb.AbstractBDBMessageStore$StoredBDBMessage.flowToDisk(AbstractBDBMessageStore.java:1263)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskIfNecessary(AbstractQueue.java:3342)
> at 
> org.apache.qpid.server.queue.AbstractQueue$FlowToDiskChecker.flowToDiskAndReportIfNecessary(AbstractQueue.java:3350)
> at 
> org.apache.qpid.server.queue.AbstractQueue.enqueue(AbstractQueue.java:1105)
> at 
> org.apache.qpid.server.message.RoutingResult$1.postCommit(RoutingResult.java:136)
> at 
> org.apache.qpid.server.txn.LocalTransaction$4.postCommit(LocalTransaction.java:304)
> at 
> org.apache.qpid.server.txn.LocalTransaction.doPostTransactionActions(LocalTransaction.java:433)
> at 
> org.apache.qpid.server.txn.LocalTransaction.commitAsync(LocalTransaction.java:417)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.commit(AMQChannel.java:1132)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQChannel.receiveTxCommit(AMQChannel.java:3407)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.processMethod(ServerDecoder.java:229)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processFrame(AMQDecoder.java:203)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.doProcessFrame(BrokerDecoder.java:141)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processFrame(BrokerDecoder.java:65)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.processInput(AMQDecoder.java:185)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:104)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder$1.run(BrokerDecoder.java:97)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.qpid.server.protocol.v0_8.BrokerDecoder.processAMQPFrames(BrokerDecoder.java:96)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQDecoder.decode(AMQDecoder.java:118)
> at 
> org.apache.qpid.server.protocol.v0_8.ServerDecoder.decodeBuffer(ServerDecoder.java:44)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:247)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl$1.run(AMQPConnection_0_8Impl.java:239)
> at java.security.AccessController.doPrivileged(Native Method)
> at 
> org.apache.qpid.server.protocol.v0_8.AMQPConnection_0_8Impl.received(AMQPConnection_0_8Impl.java:238)
> at 
> 

[jira] [Commented] (QPID-7769) [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B (unsigned byte) to maximise compatibility with other AMQP implementations

2017-05-05 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-7769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15997826#comment-15997826
 ] 

ASF subversion and git services commented on QPID-7769:
---

Commit 75be65b7b1d3949ced92b84d3ae3014c82fb06e3 in qpid-broker-j's branch 
refs/heads/master from [~k-wall]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-broker-j.git;h=75be65b ]

QPID-7769: [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) 
and B (unsigned byte) to maximise compatibility with other older AMQP 
implementations


> [AMQP 0-8..0-91] Support decoding of type codes u (unsigned short) and B 
> (unsigned byte) to maximise compatibility with other AMQP implementations
> --
>
> Key: QPID-7769
> URL: https://issues.apache.org/jira/browse/QPID-7769
> Project: Qpid
>  Issue Type: Improvement
>  Components: Java Broker
>Reporter: Keith Wall
>
> Currently the Broker fails on some paths if it tries to decode message 
> headers using type codes u (unsigned short) and B (unsigned byte). It should 
> understand these too.
> Flow to disk path fails - add exception. (TODO: check behaviour on message 
> selection and management).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org