[
https://issues.apache.org/jira/browse/PROTON-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rafael H. Schloming resolved PROTON-528.
----------------------------------------
Resolution: Fixed
Assignee: Rafael H. Schloming
> Incorrect limit for the channel number.
> ---------------------------------------
>
> Key: PROTON-528
> URL: https://issues.apache.org/jira/browse/PROTON-528
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-j
> Affects Versions: 0.7
> Reporter: Marcel Meulemans
> Assignee: Rafael H. Schloming
> Priority: Minor
> Fix For: 0.7
>
> Attachments: proton.patch
>
>
> AMQP 1.0 specifies 2 bytes for the channel number but the java implementation
> only uses the lower byte (proton-c uses both). The following code shows the
> issues when used together with the c recv example. The loop will hang after
> sending 256 messages.
> import java.io.IOException;
> import org.apache.qpid.proton.messenger.Messenger;
> import org.apache.qpid.proton.messenger.impl.MessengerImpl;
> import org.apache.qpid.proton.message.Message;
> import org.apache.qpid.proton.message.impl.MessageImpl;
> import org.apache.qpid.proton.amqp.messaging.AmqpValue;
> public class ProtonTest
> {
> public static void main(String[] args)
> {
> Messenger messenger = new MessengerImpl();
> try
> {
> messenger.start();
> for (int i = 0; i < 257; i++)
> {
> Message message = new MessageImpl();
>
> message.setAddress(String.format("amqp://localhost:5672/queue://receiver%03d",
> i));
> message.setBody(new AmqpValue("message " + i));
>
> messenger.put(message);
> messenger.send();
> System.out.println("Send message " + i);
> }
> messenger.stop();
> }
> catch (IOException e)
> {
> e.printStackTrace();
> }
> }
> }
--
This message was sent by Atlassian JIRA
(v6.2#6252)