[ 
https://issues.apache.org/jira/browse/PROTON-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940438#comment-13940438
 ] 

ASF subversion and git services commented on PROTON-528:
--------------------------------------------------------

Commit 1579211 from r...@apache.org in branch 'proton/trunk'
[ https://svn.apache.org/r1579211 ]

PROTON-528: applied patch from Marcel Meulemans to increase the proton-j max 
channel to 65536

> 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
>            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)

Reply via email to