[
https://issues.apache.org/jira/browse/QPID-6786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15020523#comment-15020523
]
Rob Godfrey commented on QPID-6786:
-----------------------------------
[~gemmellr] Your comment in the excludes file
{quote}
+// QPID-6786 Sending headers larger than [first] transfer/frame size (which is
outside the spec) isn't supported against the C++ broker
{quote}
implies you believe is it outside the spec to have a header segment (or a
struct within the header segment) that spans more than frame. I don't
immediately see where the spec says that.
Section 5.9.1 of the 0-10 spec says:
{quote}
The contents of a header segment consists of a set of sized (size="4"), coded,
packed structs. These are sequentially encoded into the segment in an undefined
order. When parsing the header segment, an implementation MUST assume that the
entries may be in any order, and intermediaries MAY reorder or insert
additional entries. A header segment MUST include at most one instance of each
type.
{quote}
Am I missing some other part of the spec which disallows the behaviour being
tested by the test? Or is it just that the C++ broker does not support in-spec
functionality.
> (0-10) ServerAssembler fails with IndexOutOfBoundsException on receipt of
> message with large headers
> ----------------------------------------------------------------------------------------------------
>
> Key: QPID-6786
> URL: https://issues.apache.org/jira/browse/QPID-6786
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: qpid-java-6.0
> Reporter: Keith Wall
> Assignee: Lorenz Quack
> Priority: Blocker
> Fix For: qpid-java-6.0
>
>
> In a regression since 0.32, if I run the following program, the Java Broker
> fails with the following IOOBE.
> {noformat}
> ava.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.Collections$SingletonList.get(Collections.java:3375)
> at
> org.apache.qpid.server.protocol.v0_10.ServerDecoder.getCurrentBuffer(ServerDecoder.java:111)
> at
> org.apache.qpid.server.protocol.v0_10.ServerDecoder.advanceIfNecessary(ServerDecoder.java:41)
> at
> org.apache.qpid.server.protocol.v0_10.ServerDecoder.getBuffer(ServerDecoder.java:49)
> at
> org.apache.qpid.server.protocol.v0_10.ServerDecoder.readUint16(ServerDecoder.java:142)
> at
> org.apache.qpid.server.protocol.v0_10.ServerAssembler.assemble(ServerAssembler.java:201)
> at
> org.apache.qpid.server.protocol.v0_10.ServerAssembler.frame(ServerAssembler.java:152)
> at
> org.apache.qpid.server.protocol.v0_10.ServerAssembler.received(ServerAssembler.java:80)
> at
> org.apache.qpid.server.protocol.v0_10.ServerInputHandler.parse(ServerInputHandler.java:175)
> at
> org.apache.qpid.server.protocol.v0_10.ServerInputHandler.received(ServerInputHandler.java:82)
> at
> org.apache.qpid.server.protocol.v0_10.AMQPConnection_0_10$3.run(AMQPConnection_0_10.java:199)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.qpid.server.protocol.v0_10.AMQPConnection_0_10.received(AMQPConnection_0_10.java:191)
> at
> org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:141)
> at
> org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:446)
> at
> org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
> at
> org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:349)
> at
> org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:223)
> at
> org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:143)
> at
> org.apache.qpid.server.transport.NetworkConnectionScheduler.access$000(NetworkConnectionScheduler.java:37)
> at
> org.apache.qpid.server.transport.NetworkConnectionScheduler$2.run(NetworkConnectionScheduler.java:112)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> {noformat:java}
> ConnectionFactory connectionFactory = (ConnectionFactory)
> context.lookup("qpidConnectionfactory");
> Connection connection = connectionFactory.createConnection();
> connection.start();
> Session session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
> Destination destination = (Destination)
> context.lookup("topicExchange");
> MessageProducer messageProducer =
> session.createProducer(destination);
> MessageConsumer messageConsumer =
> session.createConsumer(destination);
> TextMessage message = session.createTextMessage("Hello world!");
> message.setStringProperty("str1", new String(new byte[32000]));
> message.setStringProperty("str2", new String(new byte[32000]));
> message.setStringProperty("str3", new String(new byte[32000]));
> messageProducer.send(message);
> message = (TextMessage)messageConsumer.receive();
> System.out.println(message.getText());
> System.out.println(message.getStringProperty("str1").length());
> System.out.println(message.getStringProperty("str2").length());
> System.out.println(message.getStringProperty("str3").length());
> System.out.println(message.getText());
> connection.close();
> context.close();
> {noformat}
> Same program passed successfully against 0.32.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]